Validate is a wrapper for jquery.validate plugin. It's an API module and doesn't provide any UI. To use it add to your form API definition the property #validate as an array of validation rules:
[...]
'#validate' => array(
'required' => array(true, t('Email address is required.')),
'email' => array(true, t('Email is not valid.')),
'remote' => array('check_existing_mail', t('This email address is already registered'))
)
[...]
To activate validation then add:
$form['#client_validation'] = TRUE;
Validation happens in javascript and the form is submitted only when no error occurs.
You could use #validate property in a new form or hook into other forms with hook_form_alter.
For a complete list of all validation rules see: jquery.validate documentation
Credits
Sponsored by Wellnet
Project information
Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projectsObsolete
Use of this project is deprecated.- Project categories: Developer tools, Integrations
22 sites report using this module
- Created by lussoluca on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
