Class CharValidator
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.validation.validator.AbstractValidator<String>
com.inductiveautomation.ignition.gateway.web.util.CharValidator
- All Implemented Interfaces:
- Serializable,- org.apache.wicket.IComponentAwareEventSink,- org.apache.wicket.markup.html.IComponentAwareHeaderContributor,- org.apache.wicket.util.io.IClusterable,- org.apache.wicket.validation.INullAcceptingValidator<String>,- org.apache.wicket.validation.IValidator<String>
An IValidator that validates text fields in two modes: normal and strict.
 
- Normal Mode
- Ensures that the characters consist of only characters in AbstractPage.isValidChars().
- Strict Mode
- Ensures that the characters consist of only characters in AbstractPage.isStrictValidChars().
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Stringprotected booleanstatic final CharValidatorThe STRICT validator only allows numbers, letters and "_".
- 
Constructor SummaryConstructorsConstructorDescriptionCharValidator(boolean strict) CharValidator(boolean strict, String allowed) Creates a new char filter with optional strictness, and a string of characters that are explicitly allowed
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanReturns true ifxis null or:
 Starts with a letter and consists of: Letters digits _ (underscore)static booleanReturns true ifxis null or consists of: Letters digits .protected voidonValidate(org.apache.wicket.validation.IValidatable<String> validatable) Methods inherited from class org.apache.wicket.validation.validator.AbstractValidatorerror, error, error, error, resourceKey, validate, validateOnNullValue, variablesMapMethods inherited from class org.apache.wicket.behavior.BehaviorafterRender, beforeRender, bind, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, onRemove, renderHead, unbind
- 
Field Details- 
STRICTThe STRICT validator only allows numbers, letters and "_".
- 
strictprotected boolean strict
- 
allowed
 
- 
- 
Constructor Details- 
CharValidatorpublic CharValidator()
- 
CharValidatorpublic CharValidator(boolean strict) 
- 
CharValidatorCreates a new char filter with optional strictness, and a string of characters that are explicitly allowed
 
- 
- 
Method Details- 
isStrictValidCharsReturns true ifxis null or:
 Starts with a letter and consists of:- Letters
- digits
- _ (underscore)
 
- 
isValidCharsReturns true ifxis null or consists of:- Letters
- digits
- . (dot)
- ! (bang)
- _ (underscore)
- (space)
 
- 
onValidate- Specified by:
- onValidatein class- org.apache.wicket.validation.validator.AbstractValidator<String>
 
 
-