Skip to content

Releases: BlakvGhost/PHPValidator

v2.2.0 stable

09 May 17:25
Compare
Choose a tag to compare

Features

  • Full support for * wildcards in validation and transformation paths
    Wildcards can now be used in input keys to dynamically apply rules or transformations to deeply nested structures.
    Example:

    {
      "users.*.email": "required|email"
    }
    
  • Improved nested array notation handling
    Deeply nested array structures (e.g., users..addresses..city) are now fully supported across all layers:

    • Validation

    • Transformation

    • Conditional mapping

  • Extended compatibility with hybrid structures using wildcards
    You can now target nested keys inside arrays and objects simultaneously using wildcards.
    Example:

{
  "orders.*.items.*.product.id": "required|numeric"
}

Fixes

  • Fixed a bug where validation rules were not properly applied when using multi-level wildcards.

  • Resolved path conflicts involving explicit array indices combined with wildcards.

Breaking Changes

Validation rules using wildcard paths are now strictly interpreted, which may affect previously lenient or permissive behavior.

Full Changelog: v2.1.0...v2.2.0

v2.1.0 stable

18 May 16:49
Compare
Choose a tag to compare
  • Implemented NotRequiredWithRule to ensure a field is not required if another specified field is present.
  • Added passes method to validate the rule logic.
  • Included message method to provide appropriate error messages using LangManager.
  • Updated documentation and comments for clarity.

This rule is the inverse of RequiredWithRule, providing more flexible validation options.

Full Changelog: v2.0.2...v2.1.0

v2.0.2 stable

18 May 15:30
Compare
Choose a tag to compare
  • Set empty field to blank string before validation

Addresses bug where validation fails on non-required fields
that are not present in the data. By initializing missing
fields to an empty string, validation rules like min, max,
size, etc. can be properly applied without triggering an
error due to an undefined index.

Fixes #124
Full Changelog: v2.0.1...v2.0.2

v2.0.1 stable

18 May 14:53
Compare
Choose a tag to compare

What's Changed

  • Fix required rule validation for missing fields by @BlakvGhost in #14

Full Changelog: v2.0.0...v2.0.1

v2.0.0 stable

09 Dec 13:19
8195f32
Compare
Choose a tag to compare

What's Changed

  • Add feature to add default language for validation message by @BlakvGhost in #13

Full Changelog: v1.4.1...v2.0.0

v1.4 stable

22 Nov 15:59
d57663e
Compare
Choose a tag to compare

What's Changed

  • Update max length algo to work with file and array type by @BlakvGhost in #12

Full Changelog: v1.4...v1.4.1

v1.4 stable

21 Nov 02:17
79a7978
Compare
Choose a tag to compare

What's Changed

  • Fix custom rule interface namespace issues in Validator by @BlakvGhost in #11

Full Changelog: v1.3.2...v1.4

v1.3 stable

19 Nov 17:03
697e4cc
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.3...v1.3.2

v1.3 stable

18 Nov 04:30
0c143ec
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2...v1.3

v1.2 stable

17 Nov 19:05
Compare
Choose a tag to compare

Full Changelog: v1.1.3...v1.2

Add several rule as Numeric, Alpha, UpperCase, LowerCase, Accepted...