|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface IsNumericRequires that the value be a numeric value. If it is not, it will attempt to perform a conversion according either using a provided pattern, or using the locale-dependant default pattern. Usually numeric conversions are performed automatically. You should use this annotation only if you want to specify a custom numeric pattern.
| Optional Element Summary | |
|---|---|
java.lang.String |
defaultValue
If set to something different than the default (the empty string), specifies a default value that is used whenever a null value is received. |
java.lang.String |
errorCode
Error code to use if validation fails. |
java.lang.String |
message
Literal message to use if validation fails. |
java.lang.String |
messageKey
Message key to use if validation fails. |
java.lang.String |
value
Pattern to use when parsing the data, if it is not natively numeric |
public abstract java.lang.String value
public abstract java.lang.String defaultValue
IsDate and similar annotations, the default value does NOT go through the pattern parser,
in order to avoid dependancies with different locales (Since, unlike dates, some fundamental symbols in the pattern
are not literal - like decimal and thousands separators)
public abstract java.lang.String message
public abstract java.lang.String errorCode
public abstract java.lang.String messageKey
Messages.NUMERIC
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||