add client side validation to form