com.google.gwt.validation.client
Annotation Type Pattern


@Documented
@Target(value={METHOD,FIELD})
@ConstraintValidator(value=PatternValidator.class)
@Retention(value=RUNTIME)
public @interface Pattern

Asserts that the field or method matches the given regex pattern when validated. This regex pattern should be written so that it has the same functionality in Java and JavaScript.

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.
 java.lang.String pattern
          String value of the regex pattern to match against.
 

message

public abstract java.lang.String message
Message that is returned on validation failure.

Returns:
Default:
"{constraint.pattern}"

groups

public abstract java.lang.String[] groups
Groups that the constraint belongs to

Returns:
Default:
{}

pattern

public abstract java.lang.String pattern
String value of the regex pattern to match against. This should work the same in Java and JavaScript or validations may not occur properly.
By default it matches anything.

Returns:
Default:
".*"