[refactoring and improve]Check fields in registration dialog