© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
7 replies
mohdaftab

Repeater requiredIf validation from the field outside of repeater

Hello,

I am trying to make requiredUnless if the TextInput (outside of Repeater) has a certain value but it doesn't work, Please let me know how can I make this validation work?

Repeater::make("passenger_details")
->grid(2)
->schema([
TextInput::make("first_name")
->requiredUnless('passenger_type', 'self'),

TextInput::make("last_name")
->requiredUnless('passenger_type', 'self'),

TextInput::make("email")
->email(),

TextInput::make("phone")
->tel(),

])


Also I tried $get('passenger_type') inside the repeater and the passenger_type input is outside of the repeater.

Thank you
Solution
->requiredUnless(statePath: 'data.passenger_type', stateValues: 'self', isStatePathAbsolute: true)
->requiredUnless(statePath: 'data.passenger_type', stateValues: 'self', isStatePathAbsolute: true)
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Validation in the Repeater field
FilamentFFilament / ❓┊help
2y ago
Validation of field inside a repeater.
FilamentFFilament / ❓┊help
3y ago
Access state of other field outside of repeater
FilamentFFilament / ❓┊help
3y ago
Update each repeater field 2 fields outside the repeater
FilamentFFilament / ❓┊help
2y ago