add client side validation