Repository navigation
v1.0.0
Form Schema Validator PHP v1.0.0
v1.0.0 is the first stable release of the PHP validation package for Form Builder schemas and submissions.
Highlights
- Validates published form schemas with support for pages, sections, fields, and supported field types
- Validates submission payloads against schema-defined field rules, required flags, and field constraints
- Supports field-aware rule parameters using
{field:...}references - Supports runtime validation extensions for custom field behaviour and custom rule resolution
- Supports direct callable-based field validation with boolean or message-style results
- Covers common form field types, including text, numbers, dates, booleans, options, tags, email, URL, phone, country, and file inputs
Validation Support
- Required and conditional required rules
- String, numeric, boolean, date, time, and datetime validation
- Comparison rules such as
gt,gte,lt,lte,before, andafter - Membership and range rules such as
in,not_in,between, andnot_between - Pattern and string-shape rules such as
regex,starts_with, andends_with - Constraint-driven validation for text length, numeric limits, option selections, allowed email domains, country allow/block lists, and file upload limits
- Regex support for both delimited and plain schema-style patterns
Runtime Extension Hooks
fields: add extra runtime validations per fieldrules: register custom schema rule resolversvalidate => callable: run direct custom validation logic and return:trueornullto passfalseto fail with fallback message- a string to fail with a custom message
['valid' => bool, 'message' => ...]for explicit structured results
Developer Experience
- Clear separation between schema field validations and runtime validation extensions
- Lightweight API with
SchemaValidator,SubmissionValidator, andValidationResult - Tested behaviour across built-in rules, constraints, regex normalisation, and custom runtime validation hooks
Stability
- Full package test suite passing for
v1.0.0
Full Changelog: https://github.com/opheus2/form-schema-validator/commits/v1.0.0