org.apache.wicket.validation.validator
Class StringValidator.MinimumLengthValidator
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.validation.validator.AbstractValidator<java.lang.String>
org.apache.wicket.validation.validator.StringValidator
org.apache.wicket.validation.validator.StringValidator.MinimumLengthValidator
- All Implemented Interfaces:
- java.io.Serializable, IClusterable, IComponentAwareEventSink, IComponentAwareHeaderContributor, INullAcceptingValidator<java.lang.String>, IValidator<java.lang.String>
- Enclosing class:
- StringValidator
public static class StringValidator.MinimumLengthValidator
- extends StringValidator
Validator for checking if the length of a String
meets the minimum length
requirement.
- See Also:
- Serialized Form
Method Summary |
int |
getMinimum()
Retrieves the minimum length value. |
protected void |
onValidate(IValidatable<java.lang.String> validatable)
see AbstractValidator#onValidate(IValidatable) |
protected java.lang.String |
resourceKey()
Gets the message resource key for this validator's error message from the
ApplicationSettings class. |
protected java.util.Map<java.lang.String,java.lang.Object> |
variablesMap(IValidatable<java.lang.String> validatable)
Gets the default Map of variables. |
Methods inherited from class org.apache.wicket.behavior.Behavior |
afterRender, beforeRender, bind, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, renderHead, unbind |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringValidator.MinimumLengthValidator
public StringValidator.MinimumLengthValidator(int minimum)
- Constructor that sets a minimum length value.
- Parameters:
minimum
- the minimum length value
getMinimum
public final int getMinimum()
- Retrieves the minimum length value.
- Returns:
- the minimum length value
onValidate
protected void onValidate(IValidatable<java.lang.String> validatable)
- see AbstractValidator#onValidate(IValidatable)
- Specified by:
onValidate
in class AbstractValidator<java.lang.String>
- Parameters:
validatable
- the given IValidatable
instance
resourceKey
protected java.lang.String resourceKey()
- Description copied from class:
AbstractValidator
- Gets the message resource key for this validator's error message from the
ApplicationSettings
class.
NOTE: THIS METHOD SHOULD NEVER RETURN null
.
- Overrides:
resourceKey
in class AbstractValidator<java.lang.String>
- Returns:
- the message resource key for this validator
- See Also:
AbstractValidator.resourceKey()
variablesMap
protected java.util.Map<java.lang.String,java.lang.Object> variablesMap(IValidatable<java.lang.String> validatable)
- Description copied from class:
AbstractValidator
- Gets the default
Map
of variables.
NOTE: THIS METHOD SHOULD NEVER RETURN null
.
- Overrides:
variablesMap
in class AbstractValidator<java.lang.String>
- Parameters:
validatable
- the IValidatable
instance being validated
- Returns:
- a
Map
of variables for variable interpolation - See Also:
AbstractValidator.variablesMap(IValidatable)
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.