Closed vayurobins closed 4 years ago
Hi,
Have you looked at what the value that gets posted is when nothing is selected?
(I’ve not used nova in over a year so I can’t really quickly check this)
If your able to submit a PR, I can merge and release
Hi. Yes this: $value == 'undefined'
Have you tried setting a default value?
No, but I don't think there should be one though. I want the user to think about the choice and select :-)
as in have you tried setting the default to something else e.g null
Ok, I have now tested setting
->default(null)
->required()
That did not give any message feedback to the user, it just throws an error. So same error as before
I've submitted a PR #13 , but as a temporary workaround you can use the required validation rule, but you must pass an empty string as the default value.
RadioButton::make()
->default('')
->rules('required')
// ...
Hi. Thanks for this package. I have tried to add ->rules('required') and ->required() but neither seem to have any effect. I was able to make a custom check though like this: