Skip to content
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

Validation issue with radio buttons and fieldset in Safari #110

Open
pixelatorz opened this issue Apr 28, 2014 · 2 comments
Open

Validation issue with radio buttons and fieldset in Safari #110

pixelatorz opened this issue Apr 28, 2014 · 2 comments

Comments

@pixelatorz
Copy link

Hi

I was struggling to get the validation working for my radio button group. After a while I noticed the fieldset around the radio buttons (with the same ID as the name attribute of the radio buttons) caused the issue. Below is the link to a jsfiddle. When you submit the form without selecting a radio button the validation passes on Safari (Chrome works as expected).

When removing or changing the id from "opt" to something else in the jsfiddle, the validation works as expected resulting in a 'invalid' alert box.

Do you have any idea what could be causing this behaviour?

http://jsfiddle.net/Zrg4q/3/

@rickharrison
Copy link
Owner

Safari gets confused with having the same name, and it is reporting the incorrect value. For now, you should try and use a separate id for the fieldset. I will work on a solution, but it may require a little bit of a refactor.

@pixelatorz
Copy link
Author

yes, I fixed it that way :) Just wanted to let you know this strange behaviour in Safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants