new module:ct-core /validator /Json Validator(failure Message)
The JsonValidator
is a module:ct-trading/validation/Validator
that ensures the given string is
valid JSON.
Parameters:
Name | Type | Description |
---|---|---|
failureMessage |
String | The i18n tag for error message to display if |
- Implements:
Methods
validate(value, attributes, validation Result)
Determine whether the provided value is valid JSON or not and set the result on the provided
module:br-validation/ValidationResult
.
Parameters:
Name | Type | Description |
---|---|---|
value |
Object | The value to validate. |
attributes |
Object | attributes to control the validation process. Not used in this implementation. |
validationResult |
module:br-validation |
the ValidationResult in which to store the result of this validation. |
- Implements: