You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!is_string($value)) {
- throw new UnexpectedTypeException($value, 'string');+ throw new UnexpectedValueException($value, 'string');
}
This will cause a violation to be raised instead.
The "string" value is used with This value should be of type {{ type }}., thus should be translator friendly. E.g. core uses phpdoc notation to avoid any grammar being used here (string|int instead of string or integer and Some&Other instead of Some and Other).
The text was updated successfully, but these errors were encountered:
see symfony/symfony#27917 + symfony/symfony#12312
https://symfony.com/doc/current/validation/custom_constraint.html
instead of
This will cause a violation to be raised instead.
The
"string"
value is used withThis value should be of type {{ type }}.
, thus should be translator friendly. E.g. core uses phpdoc notation to avoid any grammar being used here (string|int
instead ofstring or integer
andSome&Other
instead ofSome and Other
).The text was updated successfully, but these errors were encountered: