com.google.gwt.validation.client
Annotation Type NotEmpty
@Documented
@Target(value={METHOD,FIELD})
@ConstraintValidator(value=NotEmptyValidator.class)
@Retention(value=RUNTIME)
public @interface NotEmpty
Asserts that the field or method is not empty when validated.
It also asserts that the field or method is not null.
If this behavior seems contrary to the normal pattern of returning an invalid constraint when the
value is null this is because I've had this discussion with members of the JSR-303 pannel and they've
assured me that this is the intended behavior for @NotEmpty
Further it can be seen as the composition of:
@NotNull
@Length(minimum=1)
- Author:
- chris
Optional Element Summary |
java.lang.String[] |
groups
Groups that the constraint belongs to |
java.lang.String |
message
Message that is returned on validation failure. |
message
public abstract java.lang.String message
- Message that is returned on validation failure.
- Returns:
- Default:
- "{constraint.notempty}"
groups
public abstract java.lang.String[] groups
- Groups that the constraint belongs to
- Returns:
- Default:
- {}