client side validation in rails 4