F
Filament13mo ago
Abi

Required validation for Radio button fails

not sure if it is just me, but the required validation for a radio button seems to fail. can someone confirm? Here is the code
Radio::make('customer_type')
->label('Are you a new customer?')
->options([
'YES' => 'Yes',
'NO' => 'No'
])->inline()->columnSpan(2)
->required(),
Radio::make('customer_type')
->label('Are you a new customer?')
->options([
'YES' => 'Yes',
'NO' => 'No'
])->inline()->columnSpan(2)
->required(),
4 Replies
Abi
AbiOP13mo ago
A default is never selected, I have even tried to use the default() method it doesn't set it
Abi
AbiOP13mo ago
No description
DrByte
DrByte13mo ago
I just pasted your code into one of my existing forms, clicked Edit, chose nothing, and clicked Submit ... and the validation triggered correctly:
DrByte
DrByte13mo ago
No description
Want results from more Discord servers?
Add your server