adds front-end validations to forms