Adding client side validation