working server client side validation