Added JS form validation