Basic js form validation.