add client side validation feature