Fixed JavaScript form validation issues.