NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #206 most downloaded on Packagist
Provides tools to validate values
Latest stable
v8.1.11
Last release 7 days ago
13 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Rarely documented
notes for 1 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
807 releases · first in 2011
Drag across the ruler to compare, or tap a release to open it.
Changelog (https://github.com/symfony/validator/compare/v7.3.9...v7.3.10) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.3.9...v7.3.10)
bug symfony/symfony#62745 [Validator] do not use PHPUnit mock objects without configured expectations (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.3.8...v7.3.9)
Changelog (https://github.com/symfony/validator/compare/v7.3.7...v7.3.8) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.3.7...v7.3.8)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Changelog (https://github.com/symfony/validator/compare/v7.3.6...v7.3.7) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.3.6...v7.3.7)
bug symfony/symfony#62197 [Validator] Fix call to undefined getParser() in YamlValidator (@yoeunes)
Changelog (https://github.com/symfony/validator/compare/v7.3.5...v7.3.6)
bug symfony/symfony#62028 [Validator] Update regular expression in URL validator (@mjaschen)
Changelog (https://github.com/symfony/validator/compare/v7.3.4...v7.3.5)
bug symfony/symfony#61617 [Validator] fall back to legacy options handling if configured named arguments do not match (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.3.3...v7.3.4)
bug symfony/symfony#61405 Remove calls to no-op functions, deprecated in PHP 8.5 (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v7.3.2...v7.3.3)
bug symfony/symfony#61131 [Validator] error if the fields option is missing for the Collection constraint (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.3.1...v7.3.2)
@var phpdoc (@fabpot)CompoundConstraintTestCase validator (@thePanz)bug symfony/symfony#60888 [Intl] Fix locale validator when canonicalize is true (@rdavaillaud)
Changelog (https://github.com/symfony/validator/compare/v7.3.0...v7.3.1)
Changelog (https://github.com/symfony/validator/compare/v7.3.0-RC1...v7.3.0) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.3.0-RC1...v7.3.0)
Add the filenameCharset and filenameCountUnit options to the File constraint
Deprecate defining custom constraints not supporting named arguments
Before:
use Symfony\Component\Validator\Constraint;
class CustomConstraint extends Constraint
{
public function __construct(array $options)
{
// ...
}
}
After:
use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraint;
class CustomConstraint extends Constraint
{
#[HasNamedArguments]
public function __construct($option1, $option2, $groups, $payload)
{
// ...
}
}
Deprecate passing an array of options to the constructors of the constraint classes, pass each option as a dedicated argument instead
Before:
new NotNull([
'groups' => ['foo', 'bar'],
'message' => 'a custom constraint violation message',
])
After:
new NotNull(
groups: ['foo', 'bar'],
message: 'a custom constraint violation message',
)
Add support for ratio checks for SVG files to the Image constraint
Add support for the otherwise option in the When constraint
Add support for multiple fields containing nested constraints in Composite constraints
Add the stopOnFirstError option to the Unique constraint to validate all elements
Add support for closures in the When constraint
bug symfony/symfony#60478 [Validator] add missing $extensions and $extensionsMessage to the Image constraint (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.3.0-BETA2...v7.3.0-RC1)
$extensions and $extensionsMessage to the Image constraint (@xabbuh)SlugValidator accept AsciiSlugger results (@xabbuh)feature symfony/symfony#54744 [Validator] deprecate the use of option arrays to configure validation constraints (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.2.6...v7.3.0-BETA1)
filenameCharset and filenameCountUnit options to File constraint (@IssamRaouf)When (@alexandre-daubois)framework.validation.disable_translation option (@alexandre-daubois)otherwise option in the When constraint (@alexandre-daubois)Slug constraint (@raffaelecarelle)format to error messages (@sauliusnord)bug symfony/symfony#61117 [Validator] fix handling required options (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.2.8...v7.2.9)
@var phpdoc (@fabpot)CompoundConstraintTestCase validator (@thePanz)bug symfony/symfony#60888 [Intl] Fix locale validator when canonicalize is true (@rdavaillaud)
Changelog (https://github.com/symfony/validator/compare/v7.2.7...v7.2.8)
bug symfony/symfony#60478 [Validator] add missing $extensions and $extensionsMessage to the Image constraint (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.2.6...v7.2.7)
$extensions and $extensionsMessage to the Image constraint (@xabbuh)bug symfony/symfony#60270 [Validator] [WordCount] Treat 0 as one character word and do not exclude it (@sidz)
Changelog (https://github.com/symfony/validator/compare/v7.2.5...v7.2.6)
Changelog (https://github.com/symfony/validator/compare/v7.2.4...v7.2.5) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.2.4...v7.2.5)
bug symfony/symfony#59811 [Validator] Synchronize IBAN formats (@alexandre-daubois)
Changelog (https://github.com/symfony/validator/compare/v7.2.3...v7.2.4)
bug symfony/symfony#59486 [Validator] Update sr_Cyrl 120:This value is not a valid slug. (@kaznovac)
Changelog (https://github.com/symfony/validator/compare/v7.2.2...v7.2.3)
bug symfony/symfony#59310 [Validator] the "max" option can be zero (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.2.1...v7.2.2)
errorPath option is set (@xabbuh)bug symfony/symfony#58885 [PropertyInfo][Serializer][TypeInfo][Validator] TypeInfo 7.1 compatibility (@mtarld)
Changelog (https://github.com/symfony/validator/compare/v7.2.0-RC1...v7.2.0)
IbanValidator accepts IBANs containing non-breaking and narrow non-breaking spacesPasswordStrengthValidator::estimateStrength() publicYaml constraint for validating YAML contenterrorPath to Unique constraintformat option to the Ulid constraint to allow accepting different ULID formatsWordCount constraintWeek constraintCompoundConstraintTestCase to ease testing Compound ConstraintsWhenValidatorformat parameter to DateTime constraint violation messageNothing published for this version
Changelog (https://github.com/symfony/validator/compare/v7.2.0-BETA1...v7.2.0-BETA2) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.2.0-BETA1...v7.2.0-BETA2)
feature symfony/symfony#58512 [Validator] Pass context to expressions used in When constraints (@KoNekoD)
Changelog (https://github.com/symfony/validator/compare/v7.1.6...v7.2.0-BETA1)
When constraints (@KoNekoD)CompoundConstraintTestCase to ease testing Compound Constraints (@alexandre-daubois)Week constraint (@alexandre-daubois)Ulid constraint (@alexandre-daubois)WordCount constraint (@alexandre-daubois)format option to the Ulid constraint to allow accepting different ULID formats (@alexandre-daubois)errorPath to Unique constraint (@norkunas)Yaml constraint for validating YAML content (@symfonyaml)PasswordStrengthValidator::estimateStrength() public (@yalit)bug symfony/symfony#59486 [Validator] Update sr_Cyrl 120:This value is not a valid slug. (@kaznovac)
Changelog (https://github.com/symfony/validator/compare/v7.1.10...v7.1.11)
Changelog (https://github.com/symfony/validator/compare/v7.1.9...v7.1.10) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.1.9...v7.1.10)
bug symfony/symfony#58870 [Serializer][Validator] prevent failures around not existing TypeInfo classes (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.1.8...v7.1.9)
Changelog (https://github.com/symfony/validator/compare/v7.1.7...v7.1.8) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.1.7...v7.1.8)
Changelog (https://github.com/symfony/validator/compare/v7.1.6...v7.1.7) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.1.6...v7.1.7)
bug symfony/symfony#58615 [Validator] [Choice] Fix callback option if not array returned (@symfonyaml)
Changelog (https://github.com/symfony/validator/compare/v7.1.5...v7.1.6)
OutOfRangeNetmask validation (@Fabdouarrahmane)bug symfony/symfony#58316 [Form] Don't call the constructor of LogicalOr (@derrabus)
Changelog (https://github.com/symfony/validator/compare/v7.1.4...v7.1.5)
bug symfony/symfony#58127 [Validator] synchronize IBAN formats (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.1.3...v7.1.4)
D regex modifier in relevant validators (@alexandre-daubois)tldMessage parameter to Url constraint constructor (@syjust)bug symfony/symfony#57812 [Validator] treat uninitialized properties referenced by property paths as null (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.1.2...v7.1.3)
setGroupProvider to AttributeLoader (Maximilian Zumbansen)bug symfony/symfony#57213 [Validator] [UniqueValidator] Use correct variable as parameter in (custom) error message (@seho-nl, Sebastien Hoek)
Changelog (https://github.com/symfony/validator/compare/v7.1.1...v7.1.2)
bug symfony/symfony#57305 [Validator] do not modify a constraint during validation to not leak its context (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.1.0...v7.1.1)
bug symfony/symfony#56827 Fix CharsetValidator with string encoding (@alamirault)
Changelog (https://github.com/symfony/validator/compare/v7.1.0-RC1...v7.1.0)
requireTld option to the Url constraint (the default value will become true in 8.0)PasswordStrengthValidatorStringable values when using the Cidr, CssColor, ExpressionSyntax and PasswordStrength constraintsMacAddress constraint*_NO_PUBLIC, *_ONLY_PRIVATE and *_ONLY_RESERVED versions to Ip constraintIp constraint versions for Cidr constraintlist and associative_array types to Type constraintCharset constraintrequireTld option to the Url constraintBic::INVALID_BANK_CODE_ERRORbug symfony/symfony#54924 [Validator] IBAN Check digits should always between 2 and 98 (@karstennilsen)
Changelog (https://github.com/symfony/validator/compare/v7.1.0-BETA1...v7.1.0-RC1)
Locale class existence before using it (@alexandre-daubois)feature symfony/symfony#54535 [Validator] Deprecate Bic::INVALID_BANK_CODE_ERROR (@MatTheCat)
Changelog (https://github.com/symfony/validator/compare/v7.0.7...v7.1.0-BETA1)
ALL*, LOCAL_*, UNIVERSAL_*, UNICAST_*, MULTICAST_*, BROADCAST) in MacAddress constraint (@Ninos)Bic::INVALID_BANK_CODE_ERROR (@MatTheCat)requireTld option to Url constraint (@javiereguiluz)*_NO_PUBLIC, *_ONLY_PRIV & *_ONLY_RES) in IP address & CIDR constraint (@Ninos)\Stringable instances in all constraints (@xabbuh)MacAddress constraint for validating MAC address (@Ninos)Stringable instances in CharsetValidator (@xabbuh)Charset constraint (@alexandre-daubois)list and associative_array types to Type constraint (Florian Hermann)bug symfony/symfony#57812 [Validator] treat uninitialized properties referenced by property paths as null (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.0.9...v7.0.10)
setGroupProvider to AttributeLoader (Maximilian Zumbansen)bug symfony/symfony#57213 [Validator] [UniqueValidator] Use correct variable as parameter in (custom) error message (@seho-nl, Sebastien Hoek)
Changelog (https://github.com/symfony/validator/compare/v7.0.8...v7.0.9)
bug symfony/symfony#57275 Fix autoload configs to avoid warnings when building optimized autoloaders (@Seldaek)
Changelog (https://github.com/symfony/validator/compare/v7.0.7...v7.0.8)
Locale class existence before using it (@alexandre-daubois)bug symfony/symfony#54750 [Validator] detect wrong usages of minMessage/maxMessage in options (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.0.6...v7.0.7)
Stringable in ExecutionContext::build/addViolation() (@alexandre-daubois)bug symfony/symfony#54191 [Validator] add missing invalid extension error entry (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.0.5...v7.0.6)
Changelog (https://github.com/symfony/validator/compare/v7.0.4...v7.0.5) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.0.4...v7.0.5)
bug symfony/symfony#53755 [Validator] Fix fields without constraints in Collection (@xabbuh, @HypeMC)
Changelog (https://github.com/symfony/validator/compare/v7.0.3...v7.0.4)
Collection (@xabbuh, @HypeMC)bug symfony/symfony#53620 [Validator] Fix option filenameMaxLength to the File constraint (Image) (@mindaugasvcs)
Changelog (https://github.com/symfony/validator/compare/v7.0.2...v7.0.3)
bug symfony/symfony#52867 [Validator] Only trigger deprecation when Validator annotations are used (@HypeMC)
Changelog (https://github.com/symfony/validator/compare/v7.0.1...v7.0.2)
Constraints\Email::ERROR_NAMES (@mathroc)Changelog (https://github.com/symfony/validator/compare/v7.0.0-RC2...v7.0.0) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.0.0-RC2...v7.0.0)
getConstraint(), getCause() and __toString() to ConstraintViolationInterface__toString() to ConstraintViolationListInterfacedisableTranslation() to ConstraintViolationBuilderInterface$errorNames from all constraints, use const ERROR_NAMES instead$versions from the Ip constraint, use the VERSIONS constant insteadVALIDATION_MODE_LOOSE from Email constraint, use VALIDATION_MODE_HTML5 insteadExpressionLanguageSyntax, use ExpressionSyntax insteadAnnotationLoaderValidatorBuilder::setDoctrineAnnotationReader()ValidatorBuilder::addDefaultDoctrineAnnotationReader()ValidatorBuilder::enableAnnotationMapping(), use ValidatorBuilder::enableAttributeMapping() insteadValidatorBuilder::disableAnnotationMapping(), use ValidatorBuilder::disableAttributeMapping() insteadAnnotationLoader, use AttributeLoader insteadChangelog (https://github.com/symfony/validator/compare/v7.0.0-RC1...v7.0.0-RC2) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.0.0-RC1...v7.0.0-RC2)
Changelog (https://github.com/symfony/validator/compare/v7.0.0-BETA3...v7.0.0-RC1) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.0.0-BETA3...v7.0.0-RC1)
Changelog (https://github.com/symfony/validator/compare/v7.0.0-BETA2...v7.0.0-BETA3) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.0.0-BETA2...v7.0.0-BETA3)
Changelog (https://github.com/symfony/validator/compare/v7.0.0-BETA1...v7.0.0-BETA2) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.0.0-BETA1...v7.0.0-BETA2)
feature symfony/symfony#51454 [Validator] Un-deprecate passing an annotation reader to AnnotationLoader (@derrabus)
Changelog (https://github.com/symfony/validator/compare/v6.3.6...v7.0.0-BETA1)
Type constraint, add number, finite-float and finite-number validations (@guillaume-a)constraints option of the When constraint (@alexandre-daubois)versions option of the Uuid constraint (@alexandre-daubois)[EOM] End of maintenance release for branch 6.4 [SECURITY] Security release
Changelog (v6.4.49...v6.4.50)
[EOM] End of maintenance release for branch 6.4
[SECURITY] Security release
Changelog ( v6.4.48...v6.4.49 )
Changelog (v6.4.48...v6.4.49)
[SECURITY] Security release
minor #66903 Fix Tagalog (tl) translations and typos (@jcparucha)
Changelog (https://github.com/symfony/validator/compare/v6.4.47...v6.4.48)
minor #66438 Review Dutch (nl) translations (@michelvelswijk)
Changelog (https://github.com/symfony/validator/compare/v6.4.46...v6.4.47)
minor #65926 Review Romanian (ro) translations (@robertiulianstoica)
Changelog (https://github.com/symfony/validator/compare/v6.4.45...v6.4.46)
bug #65690 Bound the nesting level of parsed expressions (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v6.4.44...v6.4.45)
One column per quarter.