Added client side validation.