Simple JavaScript form validation