| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.openedge.baritus.validation.AbstractValidator
nl.openedge.baritus.validation.AbstractFieldValidator
nl.openedge.baritus.validation.impl.MinimumFieldLengthValidator
This validator checks on minimum length. If the type of the value is a String, the string length is checked. If the type of the value is a Number, the actual number is used. E.g. if property minLength is 4, "hello" will pass, but "hi" will fail, and number 5 will pass, but 2 will fail.
| Field Summary | |
| static int | NO_MINIMUMspecial value that indicates there's no min value to check on | 
| Constructor Summary | |
| MinimumFieldLengthValidator()Construct with key invalid.field.input.size for error messages. | |
| MinimumFieldLengthValidator(int minLength)Construct with min length. | |
| MinimumFieldLengthValidator(java.lang.String errorMessageKey)Construct with message prefix for error message keys. | |
| MinimumFieldLengthValidator(java.lang.String errorMessageKey,
                            int minLength)Construct with message key for error message keys and set checking on minimum length with given length of fields only. | |
| MinimumFieldLengthValidator(java.lang.String errorMessageKey,
                            ValidationActivationRule rule)Construct with errorMessageKey and activation rule. | |
| MinimumFieldLengthValidator(ValidationActivationRule rule)Construct with activation rule. | |
| Method Summary | |
|  java.lang.String | getErrorMessageKey()Get key of error message. | 
|  int | getMinLength() | 
|  boolean | isValid(org.infohazard.maverick.flow.ControllerContext cctx,
        FormBeanContext formBeanContext,
        java.lang.String fieldName,
        java.lang.Object value)Checks whether the provided value is greater than the minimum. | 
|  void | setErrorMessageKey(java.lang.String string)Set key of error message. | 
|  void | setMinLength(int i) | 
| Methods inherited from class nl.openedge.baritus.validation.AbstractFieldValidator | 
| getOverrideValue | 
| Methods inherited from class nl.openedge.baritus.validation.AbstractValidator | 
| getFieldName, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getValidationActivationRule, removeValidationActivationRule, setErrorMessage, setValidationRule | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface nl.openedge.baritus.validation.ValidationRuleDependend | 
| getValidationActivationRule, removeValidationActivationRule, setValidationRule | 
| Field Detail | 
public static final int NO_MINIMUM
| Constructor Detail | 
public MinimumFieldLengthValidator()
public MinimumFieldLengthValidator(java.lang.String errorMessageKey)
errorMessageKey - message key of error
public MinimumFieldLengthValidator(java.lang.String errorMessageKey,
                                   int minLength)
errorMessageKey - key for error messagesminLength - minimum length allowed for values; use -1 for no minimumpublic MinimumFieldLengthValidator(ValidationActivationRule rule)
rule - activation rule
public MinimumFieldLengthValidator(java.lang.String errorMessageKey,
                                   ValidationActivationRule rule)
errorMessageKey - rule - activation rulepublic MinimumFieldLengthValidator(int minLength)
minLength - minimum length allowed for values; use -1 for no minimum| Method Detail | 
public boolean isValid(org.infohazard.maverick.flow.ControllerContext cctx,
                       FormBeanContext formBeanContext,
                       java.lang.String fieldName,
                       java.lang.Object value)
cctx - maverick contextformBeanContext - context with bean for this currentRequestfieldName - field name of parametervalue - the value of this parameter
FieldValidator.isValid(org.infohazard.maverick.flow.ControllerContext, nl.openedge.baritus.FormBeanContext, java.lang.String, java.lang.Object)public int getMinLength()
public void setMinLength(int i)
i - minimum length that is checked onpublic java.lang.String getErrorMessageKey()
public void setErrorMessageKey(java.lang.String string)
string - key of error message| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||