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
It is impossible to apply the same set of rules to multiple attributes of an object or an array.
What is the expected result?
Would be really useful to be able to apply same set of rules to multiple attributes at the same time (like it was in Yii2). Coulb be done with something like:
$rules = [
new Some(['email', 'emailConfirmation'], [
new Required(),
new Email()
]),
];
or
$rules = [
new Some(['field1', 'field2', 'field3', ...], new Required()),
];
What do you get instead?
Now I need to duplicate code like this:
$rules = [
'field1' => new Required(),
'field2' => new Required(),
'field3' => new Required(),
...
];
Additional info
Q
A
Version
1.4.1
PHP version
8.3
Operating system
Linux
The text was updated successfully, but these errors were encountered:
What steps will reproduce the problem?
It is impossible to apply the same set of rules to multiple attributes of an object or an array.
What is the expected result?
Would be really useful to be able to apply same set of rules to multiple attributes at the same time (like it was in Yii2). Coulb be done with something like:
or
What do you get instead?
Now I need to duplicate code like this:
Additional info
The text was updated successfully, but these errors were encountered: