Constructor
new module:caplin/trading/validation/TradingSystemAvailableValidator()
Constructs a new
TradingSystemAvailableValidator
.
Extends:
Extends
Methods
-
(static) validate(data, result)
-
Extracts the
module:caplin/trading/trademodel/Trade
from the__trade
field within the specified data to validate. If the trading status for the Trade ismodule:caplin/trading/trademodel/TradingStatus#UNAVAILABLE
, a message will be logged and an error added to the specifiedValidationResult
.Parameters:
Name Type Description data
module:caplin/trading/trademodel/DataHolder The data to validate. Must not be null or undefined. result
module:caplin/trading/validation/ValidationResult The module:caplin/trading/validation/ValidationResult
which a failure message will be added to. Must not be null or undefined. -
validate(oDataToValidate, oValidationResult)
-
Performs the validation on oDataToValidate according to rules in the class that implements the interface and appends information about errors found to oValidationResult.
Parameters:
Name Type Description oDataToValidate
module:caplin/trading/trademodel/DataHolder The data to validate. Must not be null or undefined. oValidationResult
module:caplin/trading/validation/ValidationResult A module:caplin/trading/validation/ValidationResult
to which information about validations is added. Must not be null or undefined.- Inherited From:
Throws:
-
if there is something wrong with the data to validate or some other exception occurs during validation.