Adding validations to the form inputs