Hi,
I'm using this script.
- jQuery(document).ready(function($){
- $("#frm1").validate({
- debug: false,
- rules: {
- name: "required",
- email: {
- required: true,
- email: true
- }
- },
- messages: {
- name: "Please let us know who you are.",
- email: "A valid email will help us get in touch with you.",
- },
- });
- });
- <form id="frm1"><fieldset>
- <ul>
- <li>
- <label for="name">Name:</label>
- <input type="text" name="name" />
- </li>
- <li>
- <label for="email">Email:</label>
- <input type="text" name="email" />
- </li>
- <div id="results"><div>
- <li>
- <input type="submit" value="submit" />
- </li>
- </ul>
- </fieldset>
- </form>
The script works fine. But I would like to change something.
I would like this:
<input type="text" name="name" />
to become this:
<input type="text" id="name" />
If i change it, the validation does not work.
Is there a way to change this?
Thank you!!