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

[validator] radio buttons are not supported #120

Closed
Ciantic opened this Issue Jul 21, 2010 · 9 comments

Comments

Projects
None yet
6 participants
@Ciantic

Ciantic commented Jul 21, 2010

Radio buttons are pretty much not supported.

For example it does not revalidate them if one changes radio button, the old error just stays there until pressing submit again. The value reported by validator function is incorrect, it should be $("input[name=myradiobox]:checked").val() or something like that.

I have made ugly workarounds that works extremely slowly in Internet Explorer due to this.

@tipiirai

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Jul 23, 2010

Contributor

I assume you are using "required" validation on radio buttons since other rule would not make sense. An easy workaround to this is to set some of the options as initially checked forcing the radio group to be required. For example

Contributor

tipiirai commented Jul 23, 2010

I assume you are using "required" validation on radio buttons since other rule would not make sense. An easy workaround to this is to set some of the options as initially checked forcing the radio group to be required. For example

@ste101

This comment has been minimized.

Show comment
Hide comment
@ste101

ste101 Aug 10, 2010

I think this is not a good idea to check one radio button. What should I check per default if you have to select between 'male' and 'female' in a contact formular?

ste101 commented Aug 10, 2010

I think this is not a good idea to check one radio button. What should I check per default if you have to select between 'male' and 'female' in a contact formular?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Aug 12, 2010

Collaborator

that is true. I quickly looked at this but it needs somewhat large refactoring. I'll try to handle this. thanks.

Collaborator

ghost commented Aug 12, 2010

that is true. I quickly looked at this but it needs somewhat large refactoring. I'll try to handle this. thanks.

@tipiirai

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Aug 15, 2010

Contributor

I was able to solve this with rather simple solution. Here is the commit:

http://github.com/jquerytools/jquerytools/commit/44ed1f147e1c2a939e3de9cf19f553ce1f1c398b

will be released on 1.2.4.

Thank you!

Contributor

tipiirai commented Aug 15, 2010

I was able to solve this with rather simple solution. Here is the commit:

http://github.com/jquerytools/jquerytools/commit/44ed1f147e1c2a939e3de9cf19f553ce1f1c398b

will be released on 1.2.4.

Thank you!

@ste101

This comment has been minimized.

Show comment
Hide comment
@ste101

ste101 Aug 25, 2010

Thank you but how can I use if for checking if a radio button in a group is checked?

ste101 commented Aug 25, 2010

Thank you but how can I use if for checking if a radio button in a group is checked?

@tipiirai

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Aug 25, 2010

Contributor

make some of the radion buttons checked initially which forces the group to be required

Contributor

tipiirai commented Aug 25, 2010

make some of the radion buttons checked initially which forces the group to be required

@ste101

This comment has been minimized.

Show comment
Hide comment
@ste101

ste101 Aug 25, 2010

@ tipiirai. Sorry but this is not a solution as I wrote above.
Wouldn't it be possible to add something like the funktions isChildType and validateGroup of the Mootools script formcheck?
http://mootools.floor.ch/en/demos/formcheck/
http://mootools.floor.ch/docs/files/formcheck-js.html

ste101 commented Aug 25, 2010

@ tipiirai. Sorry but this is not a solution as I wrote above.
Wouldn't it be possible to add something like the funktions isChildType and validateGroup of the Mootools script formcheck?
http://mootools.floor.ch/en/demos/formcheck/
http://mootools.floor.ch/docs/files/formcheck-js.html

@ideaoforder

This comment has been minimized.

Show comment
Hide comment
@ideaoforder

ideaoforder Oct 27, 2010

This actually broke the custom group validation function that I wrote, and thus, to me, seems like a step backward. This should NOT have been accepted into the master branch.

ideaoforder commented Oct 27, 2010

This actually broke the custom group validation function that I wrote, and thus, to me, seems like a step backward. This should NOT have been accepted into the master branch.

@riniculous

This comment has been minimized.

Show comment
Hide comment
@riniculous

riniculous Jan 4, 2011

I totally agree that its busted. No custom validations for radio buttons work after this patch. Is there a fix coming through?

riniculous commented Jan 4, 2011

I totally agree that its busted. No custom validations for radio buttons work after this patch. Is there a fix coming through?

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment