I want to implement login / create account function. I declared a class 'Member' and set fields 'id', 'name', 'password.' I want to use hibernate-validator to validate the fields. Here I have a problem. When you create an account, you need to enter all of the three fields. So I set @NotBlank for all fields. But when you login, you don't input name field. So you always get error message when you try to login. How do I solve this problem?
I have considered adding dummy characters when you login but it is tricky.. Any other solutions?