ninja.validation
Annotation Type Matches


@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface Matches

Validates that the parameter matches the given regular expression


Required Element Summary
 String regexp
          The regular expression to match
 
Optional Element Summary
 String fieldKey
          The key for formatting the field
 String key
          The key for the violation message
 String message
          Default message if the key isn't found
 

Element Detail

regexp

public abstract String regexp
The regular expression to match

key

public abstract String key
The key for the violation message

Returns:
The key of the violation message
Default:
"validation.matches.violation"

message

public abstract String message
Default message if the key isn't found

Returns:
The default message
Default:
"{0} is doesn\'t match the format {1}"

fieldKey

public abstract String fieldKey
The key for formatting the field

Returns:
The key
Default:
""


Copyright © 2012. All Rights Reserved.