I can't figure what to add Client Side Validation for form fields.
'#element_validate' => 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' => 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