|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pajes.html.validation.ValidationFunction
org.pajes.html.validation.IsFormat
public class IsFormat
Creates a JavaScript validation function to validate that the value entered by the user is in a format specified by a provided mask. The default mask values are:
9 number
@ alphabetic character
A uppercase alphabetic character
a lower
any character
d day portion of a date value (only 2-digit day masks are supported)
m month portion of a date value (only 2-digit numeric month masks are supported)
y year portion of a date value (2-digit or 4-digit year masks are supported -
2-digit years > 50 are assumed to be prefixed with 19 and 2-digit years
<= 50 are assumed to be prefixed with 20)
H hour portion of a time value (only 2-digit 24-hour clock hour masks are supported)
M minutes portion of a time value (only 2-digit minute masks are supported)
S seconds portion of a time value (only 2-digit seconds masks are supported)
s milliseconds portion of a time value (only 3-digit milliseconds masks are supported)
| Constructor Summary | |
|---|---|
IsFormat()
Creates a JavaScript validation function. |
|
IsFormat(InputField element,
java.lang.String displayName,
java.lang.String formatMask,
boolean mandatory)
Creates a JavaScript validation function. |
|
| Method Summary | |
|---|---|
void |
setFormatMask(java.lang.String formatMask)
Sets the formatMask. |
java.lang.String |
toJavaScript(Browser browser)
Converts the validation function into a string to be returned to the browser. |
| Methods inherited from class org.pajes.html.validation.ValidationFunction |
|---|
clone, getDisplayName, getInputField, isMandatory, setDisplayName, setInputField, setMandatory, setMandatory, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IsFormat()
public IsFormat(InputField element,
java.lang.String displayName,
java.lang.String formatMask,
boolean mandatory)
element - the input field to be validated.displayName - the name of the field that will appear in any error messages.formatMask - the format mask with which the user input must comply.mandatory - true if a value is required, or false if it may be left blank.| Method Detail |
|---|
public void setFormatMask(java.lang.String formatMask)
formatMask - the formatMask.public java.lang.String toJavaScript(Browser browser)
toJavaScript in class ValidationFunctionbrowser - the browser to which the function will be returned.
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||