We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested
For Example:
new Nested([ 'tag' => static fn() => (new Result())->addError('Too short.'), ]);
Now it's throw exception:
InvalidArgumentException: Every rule must be an instance of Yiisoft\Validator\RuleInterface, Closure given.
The text was updated successfully, but these errors were encountered:
Can you use this instead?
new Nested([ 'tag' => new Callback(static fn() => (new Result())->addError('Too short.')), ]);
Sorry, something went wrong.
Can you use this instead? new Nested([ 'tag' => new Callback(static fn() => (new Result())->addError('Too short.')), ]);
Yes, it's work. But my suggestion is more simpler and consistently with rules syntax that pass to Validator.
Validator
No branches or pull requests
For Example:
Now it's throw exception:
The text was updated successfully, but these errors were encountered: