{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "validator-descriptor.schema.json", "title": "ValidatorDescriptor", "description": "A single validator in the validators array", "type": "object", "required": ["type"], "properties": { "type": { "type": "string", "description": "Type of validator", "enum": [ "required", "minLength", "maxLength", "stringLength", "min", "minimum", "max", "maximum", "range", "pattern", "regularExpression", "email", "emailAddress", "phone", "url", "creditCard" ] }, "message": { "type": "string", "description": "Custom error message for this validator" }, "length": { "type": "integer", "description": "Length value for minLength, maxLength validators", "minimum": 0 }, "minimumLength": { "type": "integer", "description": "Minimum length for stringLength validator", "minimum": 0 }, "maximumLength": { "type": "integer", "description": "Maximum length for stringLength validator", "minimum": 0 }, "value": { "type": "number", "description": "Value for min/minimum, max/maximum validators" }, "minimum": { "type": "number", "description": "Minimum value for range validator" }, "maximum": { "type": "number", "description": "Maximum value for range validator" }, "pattern": { "type": "string", "description": "Regular expression pattern for pattern/regularExpression validators" } }, "additionalProperties": true }