© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
9 replies
BuddhaNature

nestedRecursiveRules

How can I add custom messages to
nestedRecursiveRules()
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."

TagsInput::make('tags')
    ->rules(['max:10'])
    ->validationMessages([
        'max' => 'You can only add up to :max tags.',
    ])
    ->nestedRecursiveRules([
        'min:3',
        'max:25',
    ]);
TagsInput::make('tags')
    ->rules(['max:10'])
    ->validationMessages([
        'max' => 'You can only add up to :max tags.',
    ])
    ->nestedRecursiveRules([
        'min:3',
        'max:25',
    ]);
Solution
i am suggesting

->validationMessages([
        'max' => 'You can only add up to :max tags.',
        '*.max' => 'Test :max message',
    ])
->validationMessages([
        'max' => 'You can only add up to :max tags.',
        '*.max' => 'Test :max message',
    ])
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

customizing 'nestedRecursiveRules ' message validation
FilamentFFilament / ❓┊help
2y ago
How to make a rule "in" of a multiple select
FilamentFFilament / ❓┊help
2y ago
TagsInput Validation
FilamentFFilament / ❓┊help
3y ago
TagsInput Validation on Custom Livewire Component
FilamentFFilament / ❓┊help
3y ago