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, readOnly
Constructor and Description |
---|
RequiredIfValidator() |
RequiredIfValidator(RequiredIfFunction expression) |
Modifier and Type | Method and Description |
---|---|
void |
setExpression(RequiredIfFunction expression)
Set the expression.
|
addValidatorDefinition, create, getClientOnly, getDependentFields, getOrCreateRef, getStopIfFalse, getStopOnError, getType, getTypeAsString, getValidateOnChange, setClientOnly, setDependentFields, setErrorMessage, setStopIfFalse, setStopOnError, setType, setType, setValidateOnChange
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, getReadOnly, isFactoryCreated, logConfiguration, 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, setReadOnly
public RequiredIfValidator()
public RequiredIfValidator(RequiredIfFunction expression)
public void setExpression(RequiredIfFunction expression)
expression
- the expression