public class RequiredIfValidator extends Validator
RequiredIfFunction
,
which has to be passed to
setExpression()
,
and takes two parameters: true
, the field will be
treated as a required field, so validation will fail if the field has no value.factoryCreated, factoryProperties
Constructor and Description |
---|
RequiredIfValidator() |
RequiredIfValidator(RequiredIfFunction expression) |
Modifier and Type | Method and Description |
---|---|
void |
setExpression(RequiredIfFunction expression)
Set the expression.
|
addValidatorDefinition, create, getApplyWhen, getClientOnly, getCondition, getDependentFields, getOrCreateRef, getStopIfFalse, getStopOnError, getType, getTypeAsString, getValidateOnChange, setApplyWhen, setClientOnly, setCondition, setDependentFields, setErrorMessage, setStopIfFalse, setStopOnError, setType, setType, setValidateOnChange
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
public RequiredIfValidator()
public RequiredIfValidator(RequiredIfFunction expression)
public void setExpression(RequiredIfFunction expression)
expression
- the expression