The jQuery Validate Form Verification plug-in adds the class attribute Form validation, jqueryvalidate

Source: Internet
Author: User
Tags api manual valid email address


The jQuery Validate Form Verification plug-in adds the class attribute Form validation, jqueryvalidate


This article introduces the jQuery Validate Form Verification plug-in, and adds the class attribute Form Verification for your reference. The details are as follows:

The effect is as follows:




I. jQuery Form Verification plug-in, adding class attribute Validation


<Html>

Ii. default rules Default verification rules:


(1) required: required field for true

(2) remote: "check. php" uses ajax to call check. php to verify the input value.

(3) email: true: You must enter an email in the correct format.

(4) url: true must enter the url in the correct format

(5) date: true: You must enter a date in the correct format to verify ie6. Use it with caution.

(6) dateISO: true: the date (ISO) in the correct format must be entered. For example, 2009-06-23,1998/01/22: only the format is verified and the validity is not verified.

(7) number: true: a valid number (negative number, decimal number) must be entered)

(8) digits: true must be an integer.

(9) creditcard: a valid credit card number must be entered.

(10) must to: "# field" the input value must be the same as # field

(11) accept: enter a string with a valid suffix (the suffix of the uploaded file)

(12) maxlength: A string with a maximum length of 5 characters)

(13) minlength: 10 string with a minimum input length of 10 (one character for Chinese characters)

(14) rangelength: [5, 10] The input length must be a string between 5 and 10. ") (a Chinese character is a single character)

(15) range: [5, 10] The input value must be between 5 and 10.

(16) max: 5 input value cannot be greater than 5

(17) min: 10 input value cannot be less than 10

Default prompt:



Messages: {required: "This field is required. ", remote:" Please fix this field. ", email:" Please enter a valid email address. ", url:" Please enter a valid URL. ", date:" Please enter a valid date. ", dateISO:" Please enter a valid date (ISO ). ", dateDE:" Bitte geben Sie ein g eyebrow ltiges Datum ein. ", number:" Please enter a valid number. ", numberDE:" Bitte geben Sie eine Nummer ein. ", digits:" Please enter only digits ", creditcard:" Please enter a valid credit card number. ", failed to:" Please enter the same value again. ", accept:" Please enter a value with a valid extension. ", maxlength: $. validator. format ("Please enter no more than {0} characters. "), minlength: $. validator. format ("Please enter at least {0} characters. "), rangelength: $. validator. format ("Please enter a value between {0} and {1} characters long. "), range: $. validator. format ("Please enter a value between {0} and {1 }. "), max: $. validator. format ("Please enter a value less than or equal to {0 }. "), min: $. validator. format ("Please enter a value greater than or equal to {0 }. ")},


The above is all the content of this article, hoping to help you learn.


Articles you may be interested in:

Jquery. validate Introduction Part 3

Step 4 of jquery validate Introduction

Jquery. validate Step 5 Regular Expression Verification

JQuery validate Chinese API attached validate. js Chinese api Manual

Validation of JQuery extension Validate-6 radio, checkbox, and select

JQuery EasyUI API Chinese Document-ValidateBox verification box

Usage of jQuery. Validate verification Library

Jquery Validate Regular Expression Practical Verification Code

Jquery validate add custom verification rules (verify email postal code)

Form Verification Based on Bootstrap + jQuery. validate



Related Article

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.