public final class VTime extends FieldValidator
useAM_PM
and allowSpaceBeforeAM_PM(boolean)
methods.Constructor and Description |
---|
VTime(AbstractText field,
String errorMessage) |
Modifier and Type | Method and Description |
---|---|
void |
allowSpaceBeforeAM_PM(boolean allow) |
void |
useAM_PM(boolean useAM_PM) |
boolean |
validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Works with any field that returns a String via it's
Field#getValue method. |
getErrorMessage, getField
public VTime(AbstractText field, String errorMessage)
public void useAM_PM(boolean useAM_PM)
public void allowSpaceBeforeAM_PM(boolean allow)
public boolean validate(FormData fd, javax.servlet.http.HttpServletRequest req)
Field#getValue
method.
If validation succeeds, this method puts the parsed date in the specified form data as the validated value for the target field. This saves the hassle of reparsing the text when (typically) retrieving it later to save the value out to the database.
validate
in class FieldValidator
ClassCastException
- If the field's Field#getValue
method
does not return a String