Class AbstractValidator
java.lang.Object
org.exoplatform.webui.form.validator.AbstractValidator
- All Implemented Interfaces:
Serializable,Validator
- Direct Known Subclasses:
DateTimeValidator,ExpressionValidator,MandatoryValidator,MultipleConditionsValidator,NameValidator,NaturalLanguageValidator,NullFieldValidator,PasswordPolicyValidator,PersonalNameValidator,SpecialCharacterValidator,StringLengthValidator
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MessageExceptioncreateMessageException(String value, UIFormInput uiInput) protected MessageExceptioncreateMessageException(String value, UIFormInput uiInput, String localizationKey) protected StringgetLabelFor(UIFormInput uiInput) protected Object[]getMessageArgs(String value, UIFormInput uiInput) protected abstract Stringprotected abstract booleanisValid(String value, UIFormInput uiInput) protected StringtrimmedValueOrNullIfBypassed(String value, UIFormInput uiInput, boolean exceptionOnMissingMandatory, boolean trimValue) voidvalidate(UIFormInput uiInput)
-
Field Details
-
exceptionOnMissingMandatory
protected boolean exceptionOnMissingMandatory -
trimValue
protected boolean trimValue
-
-
Constructor Details
-
AbstractValidator
public AbstractValidator()
-
-
Method Details
-
getLabelFor
- Throws:
Exception
-
validate
-
createMessageException
protected MessageException createMessageException(String value, UIFormInput uiInput) throws Exception - Throws:
Exception
-
createMessageException
protected MessageException createMessageException(String value, UIFormInput uiInput, String localizationKey) throws Exception - Throws:
Exception
-
getMessageArgs
- Throws:
Exception
-
getMessageLocalizationKey
-
isValid
-
trimmedValueOrNullIfBypassed
protected String trimmedValueOrNullIfBypassed(String value, UIFormInput uiInput, boolean exceptionOnMissingMandatory, boolean trimValue) throws Exception - Throws:
Exception
-