views:

90

answers:

1

Hello, i have a User class with a field for the e-mail-address and a password.

@NotNull
@Size(min=6)
@Pattern(flags=Pattern.Flag.CASE_INSENSITIVE ,regexp="[^ ]*")
private String password = null;

@NotNull) 
@Size(max=60) 
@EmailUse // Check if the email-address is already in the database
@Email
private String emailAddress = null;

This code works well at the registration. But when the user will edit his data i have a Problem with the Password and with the @EmailUse tag. The password is at the <h:inputSecret id="password" value="#{user.password}"/> empty so i became a problem with @NotNull. With the email address i have the problem that the email address from the user are already in the database but at this point is this no problem.

So my question is: Can i temporary disable this two checks?

Thank you very much for the help

A: 

You can disable validation using <f:validateBean disabled="true"/>, example: http://relation.to/13317.lace

I hope this will be applicable in your case.

Piotr Kochański
Thank you, this works for me.
ThreeFingerMark