nestedRecursiveRules
How can I add custom messages to
nestedRecursiveRules()
in a tag input? In the example below, I get the following error: "The mountedActionsData.0.tags.7 field must not be greater than 25 characters."
Solution:Jump to solution
i am suggesting
```php
->validationMessages([
'max' => 'You can only add up to :max tags.',...
6 Replies
have you potentially tried
'*.max'
as the keyThis part of what I posted works:
That limits the total number of tags to five and generates a usefull message to the user. Which is great. However, I want to limit each individual tag to 3 to 25 characters. The validation itself works fine, but I don't know how to change the validation message for the nested rules.
Also, *.max won't be ideal because
max
works differently in the content of the number of tags and the total length of individual tags.i know
Solution
i am suggesting
idk if it will work but it might be worth a shot
Yes. That worked. Thank you.