Package com.smartgwt.client.callbacks
Interface ValidatorConditionCallback
public interface ValidatorConditionCallback
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Callback
required for the propertyValidator.condition
and ValidatorDefinition.condition.
-
Method Details
-
execute
boolean execute(DataSourceField item, Validator validator, Object value, Map record, Map additionalContext) Callback
required for the propertyValidator.condition
and ValidatorDefinition.condition.- Parameters:
item
- FormItem, DataSourceField or ListGridField on which this validator was declared. NOTE: FormItem will not be available during a save performed without a form (eg programmatic save) or if the field is not available in the form.validator
- Validator declaration from egDataSourceField.validators
.value
- value to validaterecord
- Field values for record being validated.additionalContext
- Object containing extra context which may be useful to the condition function. Contains the following properties:
- validatorDefinition: the ValidatorDefinition for the validator being processed. This allows easy access to custom validator defintion properties while evaluating the condition.
-
component: the DynamicForm or ListGrid being validated
- rowNum: the row number of the cell
being validated (only if component is a ListGrid)
- colNum: the column number of the cell being validated (only if component is a ListGrid)
- Returns:
- whether the value passed validation. True for passed, false for fail.
-