fix registration form validation