added validations to form fields