Added some client side validation