javascript form validation assignment