Class
caplin.core.validator

JsonValidator

Implements caplin.core.Validator.

Constructor Summary

Attributes Name and Description
caplin.core.validator.JsonValidator(String failureMessage)

The JsonValidator is a caplin.trading.validation.Validator that ensures the given string is valid JSON.

Method Summary

Attributes Name and Description
void validate(Object value, Object attributes, caplin.core.ValidationResult validationResult)

Determine whether the provided value is valid JSON or not and set the result on the provided caplin.core.ValidationResult.

Constructor Detail

caplin.core.validator.JsonValidator(String failureMessage)

The JsonValidator is a caplin.trading.validation.Validator that ensures the given string is valid JSON.

Parameters
String failureMessage The i18n tag for error message to display if value is not valid JSON.

Method Detail

void validate(Object value, Object attributes, caplin.core.ValidationResult validationResult)

Determine whether the provided value is valid JSON or not and set the result on the provided caplin.core.ValidationResult.

Parameters
Object value The value to validate.
Object attributes attributes to control the validation process. Not used in this implementation.
caplin.core.ValidationResult validationResult the ValidationResult in which to store the result of this validation.