fc.web.forms
Class VDate
java.lang.Object
fc.web.forms.FieldValidator
fc.web.forms.VDate
public final class VDate
- extends FieldValidator
Validates a date.
|
Method Summary |
boolean |
validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Works with any field that returns a String via it's
Field#getValue method. |
VDate
public VDate(AbstractText field,
String errorMessage)
validate
public boolean validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
- Works with any field that returns a String via it's
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/1980
- Specified by:
validate in class FieldValidator
- Throws:
ClassCastException - If the field's Field#getValue method
does not return a String