Loading
Issue #3627330: Add validation constraint metadata to JSON Schema
Introduces an optional JsonSchemaConstraintInterface and an initial implementation for Length constraints.
Adds minLength and maxLength to primitive string schemas, including nullable strings. Existing overlapping restrictions are preserved using allOf.
Byte counting, grapheme counting, non-UTF-8 charsets, and normalization callbacks retain their existing schemas.
Validation:
- Serialization unit suite: 143 tests, 480 assertions passed.
- Kernel regression tests: 8 tests, 16 assertions passed.
- PHPStan and whitespace checks passed.
Design feedback requested on the interface namespace and contract, schema integration, and expanding support to other constraints.