Fix form validation check