Added client-side file validator
Fixed typo and inconsistent conditionals
Changed Array.prototype.slice.call() into jQuery's $.each function for consistency
Fixes #4360: Added client validation support for file validator