Ajax form validating

Validate qty of checkboxes in a group (same name) have been checked, using min, max or range.

ajax form validating-16

The implemented rules are: Here you can read more about how to create your own modules.

There are four different callbacks you can declare when setting up the validation.

Use submit Handler to implement your own form submit, eg. Use invalid Handler to react when an invalid form is submitted.

Use rules and messages to specify which elements to validate, and how.

Even though this plugin has a wide range of validation functions it's designed to require as little network traffic as possible.

This is achieved by grouping together validation functions in "modules", making it possible to load only those functions that's needed to validate a particular form.

There are also two types of events triggered on elements when they get validated. An input with an invalid value will automatically get a red border color.

You can use the setup function if you want to change the border color to something else, set the property to an empty string if you don't want the border color to change when the input has an invalid value.

You can however set your own parameter name by using the attribute By using the module sanitize you will be able to declare sanitation functions that will be triggered when inputs looses focus.

Tags: , ,