added input validations to forms