adds validations for fields