Attributes | Name and Description |
---|---|
|
caplin.trading.validation.AbstractFieldValidator(Array l_pFields)
The constructor for AbstractFieldValidator. |
Attributes | Name and Description |
---|---|
|
void
validate(caplin.trading.trademodel.DataHolder oDataToValidate, caplin.trading.validation.ValidationResult oValidationResult)
Validates the supplied data and adds an error map to the validation result if any of the fields are missing, or if the implementing validator deems that the field contains an error. |
|
String
validateField(String sFieldValue)
Performs validation on the specified field according to rules in the implementing class and returns an error message if the field contains an error. |
►
caplin.trading.validation.AbstractFieldValidator(Array l_pFields)
The constructor for AbstractFieldValidator.
Array | l_pFields | An array of field names as strings that must be present in the data to validate. Must not be null. |
►
void
validate(caplin.trading.trademodel.DataHolder oDataToValidate, caplin.trading.validation.ValidationResult oValidationResult)
Validates the supplied data and adds an error map to the validation result if any of the fields are missing, or if the implementing validator deems that the field contains an error. The error object is a map with the field name as the key and the error as the value.
caplin.trading.trademodel.DataHolder | oDataToValidate | The data to validate. Must not be null or undefined. |
caplin.trading.validation.ValidationResult | oValidationResult | A caplin.trading.validation.ValidationResult to which the error map is added. Must not be null or undefined. |
►
String
validateField(String sFieldValue)
Performs validation on the specified field according to rules in the implementing class and returns an error message if the field contains an error. This method is abstract. Extending classes should implement this method to provide specific validation for a field value.
String | sFieldValue | The field value to validate. |