Validation for all forms
Refactored form validation