Skip to content

Releases: opheus2/form-schema-validator

v1.0.3

Choose a tag to compare

@opheus2 opheus2 released this 11 Apr 15:14
32e4047
  • Add support for visibility in submission validation(32e4047)
    opheus2

  • feat: add 'banner' field type support in SchemaValidator and corresponding test(210cdd6)
    opheus2

  • feat: add support for 'tabs' option type in SubmissionValidator and corresponding test(f320ec9)
    opheus2

  • feat: update SubmissionValidator to allow separate nullable and string rules for optional sub-fields(e808080) opheus2

Full Changelog: v1.0.2...v1.0.3

v1.0.2

Choose a tag to compare

@opheus2 opheus2 released this 01 Apr 10:22
8c64c7a
  • Add support for address_properties validations
    Full Changelog: v1.0.1...v1.0.2

v1.0.1

Choose a tag to compare

@opheus2 opheus2 released this 26 Mar 13:44
041997f
  • Improve error handling according to error spec

Full Changelog: v1.0.0...v1.0.1

v1.0.0

Choose a tag to compare

@opheus2 opheus2 released this 25 Mar 21:52
719f6b0

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, and after
  • Membership and range rules such as in, not_in, between, and not_between
  • Pattern and string-shape rules such as regex, starts_with, and ends_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 field
  • rules: register custom schema rule resolvers
  • validate => callable: run direct custom validation logic and return:
    • true or null to pass
    • false to 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, and ValidationResult
  • 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