public final class VDate extends FieldValidator
Constructor and Description |
---|
VDate(AbstractText field,
String errorMessage) |
Modifier and Type | Method and Description |
---|---|
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 VDate(AbstractText field, String errorMessage)
public boolean validate(FormData fd, javax.servlet.http.HttpServletRequest req)
Field#getValue
method. The date string can be any
valid string that is parseable by the java.text.DateFormat.parse(String)
method (even if it's not
semantically valid). For example, the following parses OK:
02/29/1980validate
in class FieldValidator
ClassCastException
- If the field's Field#getValue
method
does not return a String