This project has retired. For details please refer to its
Attic page .
CustomBirthDateValidator (Cocoon API 2.1.12-dev [March 20 2012])
org.apache.cocoon.forms.samples
Class CustomBirthDateValidator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.forms.samples.CustomBirthDateValidator
All Implemented Interfaces: LogEnabled , WidgetValidator
public class CustomBirthDateValidator extends AbstractLogEnabled implements WidgetValidator
Example of a custom validator. Check that the given date is a valid birth date, i.e.
is at least 5 years before current date and no more than 100 years old.
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
CustomBirthDateValidator
public CustomBirthDateValidator ()
validate
public boolean validate (Widget widget)
Description copied from interface: WidgetValidator
Validate a widget.
Specified by: validate
in interface WidgetValidator
Parameters: widget
- the widget to validate
Returns: true
if validation was successful. If not, the validator must have set
a ValidationError
on the widget or one of its children.See Also: WidgetValidator.validate(org.apache.cocoon.forms.formmodel.Widget)
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.