Online Demo
You can still remember the jquery. validationEngine plug-in that we have introduced. Using this plug-in, you can generate a powerful form verification function without having to write any line of js Code. Is it amazing? The introduction of Parsley today also helps you implement form verification only with simple configuration, based on its powerful DOM-API.
Main features
• Superb User Experience
• Super convenient configuration
• Ultra-lightweight (12 K after compression), supporting jQuery and Zepto
• Super simple, just a simple configuration of DOM-API, similar to jQuery's data API
• Absolutely free
• Excellent reliability
Built-in verification
• Required: required input
• Not blank: cannot be blank
• Min length: Minimum length
• Max length: Maximum length
• Range length: length Interval
• Min: Minimum value
• Max: Maximum Value
• Range: region value
• RegExp: Regular Expression
• Equal To: Equal
• Min check: check the minimum number of checkboxes selected
• Max check: check the maximum number of checkboxes selected
• Range check: check the number of checkbox intervals.
• Remote: ajax Verification
It is very easy to use and configure Parsley. js. You only need to use the HTML data attribute to configure html, as shown below:
Copy codeThe Code is as follows:
<Form id = "demo-form" data-validate = "parsley">
<Label for = "fullname"> Full Name *: </label>
<Input type = "text" id = "fullname" name = "fullname" data-required = "true"/>
<Label for = "email"> Email *: </label>
<Input type = "text" id = "email" name = "email" data-trigger = "change" data-required = "true" data-type = "email"/>
<Label for = "website"> Website: </label>
<Input type = "text" id = "website" name = "website" data-trigger = "change" data-type = "url"/>
<Label for = "message"> Message (20 chars min, 200 max): </label>
<Textarea id = "message" name = "message" data-trigger = "keyup" data-rangelength = "[20,200]"> </textarea>
</Form>
Is it very convenient and the documentation is very complete, but if you need to use Chinese, you need to localize it yourself. I believe that if you have used it, you will certainly like it!