How to add client side validation to form via FAPI? I can't figure what to add Client Side Validation for form fields.

'#element_validate' =&gt; array('_file_generic_settings_max_filesize'),


I also don't know which value to put for different types of validation such as digit, email etc.
    '#element_validate' => 'email',

Also if I use this documentation https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7.x/#element_validate:

'#element_validate' =&gt; array('email'),


it states that it needs to be string not an array.

And after all this documentation doesn't state that how to add validation instead just creating own validation:
https://www.drupal.org/node/1324788
Solution was to add following for each integer field with form alter:

['#rules'] = array('digit');


And perhaps it was also needed to set 'views_exposed_filters' as a custom form for validation in the settings of Client Side Validation module.