Caplin Trader 4.7.1

Class: module:br/presenter/validator/CrossValidationPropertyBinder

module:br/presenter/validator/CrossValidationPropertyBinder

The CrossValidationPropertyBinder is used to associate a single module:br/presenter/validator/CrossPropertyValidator instance with multiple module:br/presenter/property/Property instances.

The module:br/presenter/property/Property class does not directly support the registration of cross property validators, so the CrossValidationPropertyBinder bridges this gap by creating a standard module:br/validation/Validator that proxies all validation calls to the underlying module:br/presenter/validator/CrossPropertyValidator.

Constructor

new module:br/presenter/validator/CrossValidationPropertyBinder()

Methods

bindValidator(mProperties, oCrossPropertyValidator)

Binds the given validator to the set of named properties provided.
Parameters:
Name Type Description
mProperties Object The set of named properties that oCrossPropertyValidator expects.
oCrossPropertyValidator module:br/presenter/validator/CrossPropertyValidator The validator that will validate mProperties.
See:
Returns:
A numeric bind ID that can be used to later unbind this validator using #unbindValidator.

unbindValidator(nBindId)

Unbinds a cross-property validator previously set-up using #bindValidator.
Parameters:
Name Type Description
nBindId int A numeric bind ID previously returned by #bindValidator.
See: