ValidationRule
A validation rule applied to a field after parsing
ruleIdstringrequired
Unique identifier for this rule within the spec
Example:
vr-001fieldstringrequired
Name of the field this rule applies to
Example:
amountruleTypeRuleType (string)required
Type of validation rule
Possible values: [NOT_NULL, NOT_EMPTY, MIN_LENGTH, MAX_LENGTH, EXACT_LENGTH, REGEX, MIN_VALUE, MAX_VALUE, BETWEEN, ALLOWED_VALUES, CUSTOM_EXPRESSION, CROSS_FIELD]
Example:
MIN_VALUEvaluestring
Primary comparison value (e.g. min value, regex pattern, allowed list)
Example:
0secondaryValuestring
Upper bound for BETWEEN rules
Example:
999999messagestringrequired
Human-readable error message when the rule fails
Example:
Amount must be non-negativeseveritySeverity (string)
Severity level of a validation error
Possible values: [INFO, WARNING, ERROR, FATAL]
Example:
ERRORValidationRule
{
"ruleId": "vr-001",
"field": "amount",
"ruleType": "MIN_VALUE",
"value": "0",
"secondaryValue": "999999",
"message": "Amount must be non-negative",
"severity": "ERROR"
}