-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No validation error when submitting a required select component with an empty option #329
Comments
Thanks @k0va1 that sent me in the right direction, although it's Now I have a blank, but I'm expecting there to be a validation error message when submitting since it's required, but I don't have one. Do you have any advice? View
Controller
|
rbarreca
changed the title
How to create a required select component with an empty option?
No validation error when submitting a required select component with an empty option
Nov 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's probably just user error, but I can't figure out how to make a required select component with an empty option. It doesn't trigger any Polaris validation, rather just gets to the Rails controller and errors out with
undefined method
map' for nil:NilClass`.I've tried adding [''] or [['', '']] or [['', nil]] to
@options_from_controller
, but none of them do the trick. What am I doing wrong?The example for required doesn't have an empty option which makes it not useful.
The text was updated successfully, but these errors were encountered: