Class
caplin.trading.validation

NotEmptyValidator

The NotEmptyValidator is a caplin.trading.validation.Validator that verifies that the validated data contains all the fields specified in the constructor, and that these fields are not null. This class is immutable.

Constructor Summary

Attributes Name and Description
caplin.trading.validation.NotEmptyValidator(Array l_pMandatoryFields)

The constructor for the NotEmptyValidator.

Method Summary

Attributes Name and Description
String validateField(String sFieldValue)

Performs validation on the specified field to determine if it exists in the mandatory fields.

Methods inherited from class caplin.trading.validation.AbstractFieldValidator:
validate

Constructor Detail

caplin.trading.validation.NotEmptyValidator(Array l_pMandatoryFields)

The constructor for the NotEmptyValidator.

Parameters
Array l_pMandatoryFields an array field names as strings that must be present in the data to validate. Must not be null.
Throws
caplin.core.Error
if the mandatory fields is not an array of strings.

Method Detail

String validateField(String sFieldValue)

Performs validation on the specified field to determine if it exists in the mandatory fields.

Parameters
String sFieldValue The field value to validate.
Returns
An error message indicating the validation failure, or null if no errors occurred.