Validating forms with

18-Oct-2017 12:51

// Array used as error collection var errors = [], // Validation configuration conf = , // Optional language object lang = ; // Manually load the modules used in this form $Modules('security, date'); $('#check-form').on('click', function() ); Notice!

This j Query plugin has support for a lot more validation functions, you find them all in the menu to the right.

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.

The If wanting to use a custom method that handles the displaying/removing of error messages you should use the two methods described above.

Modifying the server request The parameter containing the input value, sent to the server, will by default have the same name as the input.

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.

This j Query plugin has support for a lot more validation functions, you find them all in the menu to the right.

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.

The If wanting to use a custom method that handles the displaying/removing of error messages you should use the two methods described above.

Modifying the server request The parameter containing the input value, sent to the server, will by default have the same name as the input.

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.

You don’t have to do anything fancy in your app, most of the work goes into the HTML.