org.barracudamvc.core.forms.validators
Class CardinalityValidator
java.lang.Object
org.barracudamvc.core.forms.AbstractFormValidator
org.barracudamvc.core.forms.DefaultFormValidator
org.barracudamvc.core.forms.validators.CardinalityValidator
- All Implemented Interfaces:
- FormValidator
public class CardinalityValidator
- extends DefaultFormValidator
This validator ensures that a value is a valid date
- Since:
- 1.0
- Version:
- %I%, %G%
- Author:
- Diez B. Roggisch
Method Summary |
void |
validateFormElement(Object val,
FormElement element,
boolean deferExceptions)
Validate a FormElement to make sure the number of values is in the specified range |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ONE
public static final FormValidator ONE
ONE_TO_MANY
public static final FormValidator ONE_TO_MANY
ZERO_TO_MANY
public static final FormValidator ZERO_TO_MANY
ZERO_TO_ONE
public static final FormValidator ZERO_TO_ONE
CardinalityValidator
public CardinalityValidator(int min,
int max)
- Public constructor.
CardinalityValidator
public CardinalityValidator(String ierrmsg,
int min,
int max)
- Public constructor.
validateFormElement
public void validateFormElement(Object val,
FormElement element,
boolean deferExceptions)
throws ValidationException
- Validate a FormElement to make sure the number of values is in the specified range
- Overrides:
validateFormElement
in class DefaultFormValidator
- Parameters:
val
- the actual value to be validatedelement
- the form element that contains the val
to validate elements by comparing them with other elements)deferExceptions
- do we want to deferValidation exceptions
and attempt to validate all elements so that we can process
all the exceptions at once
- Throws:
ValidationException
- if the element is not valid
Copyright © 2006 BarracudaMVC.org All Rights Reserved.