NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #3216 most downloaded on Packagist
Simple, elegant, stand-alone validation library with NO dependencies
Latest stable
v1.4.11
Last release 4 years ago
no release in 18 months
Ships fairly regularly
a new release about every 6 months
Some releases are documented
notes for 14 of 31 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
31 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
requireWith(out) now supports dot notation
Thank to all contributors!
testing now runs as a github workflow
Allow disabling of auto prepending the field labels
Allow disabling of auto prepending the field labels
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Add support for SL language
Add support for SL language
New rules requiredWith and requiredWithout for conditional requirements
New rules requiredWith and requiredWithout for conditional requirements
new rule listContains - Performs in_array check on given array values
new rule listContains - Performs in_array check on given array values
Nothing published for this version
Fixed a bug[#262] where array elements where considered required when any rule was applied to them New rules for dealing with arrays: subset and conta
Fixed a bug[#262] where array elements where considered required when any rule was applied to them New rules for dealing with arrays: subset and containsUnique Languages: new string in Lithuanian, Norwegian Bokmål added Additional documentation and comments
New languages: Lithuanian, Swedish, Korean New option to stop validating when the first error is encountered Support for nested arrays for 'equals' an
New languages: Lithuanian, Swedish, Korean New option to stop validating when the first error is encountered Support for nested arrays for 'equals' and 'different' rules Enhanced tests
The validateRequired method required $fields to be an array, and this broke compatibility with objects that implement PHP's ArrayAccess interface.
The validateRequired method required $fields to be an array, and this broke compatibility with objects that implement PHP's ArrayAccess interface.
Please note that while ArrayAccess-objects will probably work most of the time, Valitron is meant to be used with actual arrays.
updated translations for pt-br, it and fr
Validator::mapFieldRules() provides another way of adding rules on a per-field basis
Validator::mapFieldRules() provides another way of adding rules on a per-field basis
Added a flag to validateInteger() to enable strict checking (bypassing PHP's automatic conversions)
Fixed a bug where Validator::withData would erase all rules.
Massive thanks to @wenbinye for spotting the bug, and sorry for any inconvenience it may have caused
Validator::rule now supports any kind of callable
General:
Languages:
Rules:
Thanks to @willemwollebrants for his work on issues and PRs to get this release out.
validateAccepted() now also accepts string '1' as valid
Updated:
New functionality:
New languages:
Updated language:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.