"Sharp jquery" form verification plug-in pit

Source: Internet
Author: User

As mentioned in previous posts, due to version reasons, the "sharp jquery" form verifies that the plug-in part also appears to be out of effect.

    • How to use the book:

1. The introduction of the jquery source file,

2. Introduce the form validation plugin js file,

3. Add "Required" to the class name in the form, "email" and so on as the parameters read when validating.

4. Calling code: $ ("#commentform"). Validate ();

Unfortunately, the error has been made. The front end has a saying is learning new not to learn old, here do not go to the reason, directly provide the latest writing.

    • Latest wording:

    1. Open http://code.ciaoca.com/jquery/validation-engine/Download

      Step One:

      

      Step:

      

Step Three:

The box of the two files we need to use, where languages is stored in the language of the configuration files.

2. The introduction of the jquery source file,

3. Introduce the form validation plug-in configuration file,

4. Introduction of form Validation Plug-in (file introduction such as:)

      

5. Verify the settings and add them directly to the class name. The following is an HTML structure that is rewritten with the latest method, according to the original verification requirements in the book:

    <formMethod= "Get"Action="#"class= "Cmxform"ID= "Commentform">        <fieldset>            <legend>A simple example of validation with validation hints</legend>            <P>                <label for= "Cusername">Name</label><em>*</em>                <inputtype= "text"ID= "Cusername"name= "username"size= "+"class= "validate[required,minsize[2],maxsize[11]]">            </P>            <P>                <label for= "Cemail">Email</label><em>*</em>                <inputtype= "text"ID= "Cemail"name= "Email"size= "+"class= "Validate[required,custom[email]]">            </P>            <P>                <label for= "Curl">Url</label><em>*</em>                <inputtype= "text"ID= "Curl"name= "url"size= "+"class= "Validate[required,custom[url]]">            </P>            <P>                <label for= "Ccomment">Your comments</label><em>*</em>                <textareatype= "text"ID= "Ccomment"name= "comment"size= "All"class= "validate[required]"></textarea>            </P>            <P>                <inputtype= "Submit"class= "Submit"value= "Submit">            </P>        </fieldset>    </form>

6. Calling code:

<script>    $ (function() {        $ ("#commentform"). Validationengine ();    }) </script>

In addition, set-up validation can also customize parameters and support chained operations. Interested can self-study-> http://code.ciaoca.com/jquery/validation-engine/

"Sharp jquery" form verification plug-in pit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.