Validation for Radio Button widget as a whole

On our radar
At the moment, it's not possible to validate a group of radio buttons refering to one same form variable. In order to display a validatin message when none of the radio buttons is selected, I have to manually check if at least one of the radio buttons is selected in order to display a 'custom' validation message that applies to the whole group of the radio buttons.
Created on 18 May 2016
Comments (3)
not sure if I understand?

2 ways, you mean client-validation? then yes, that is tough...

that is a simple check, which you would probably do for some integers as well, if they need to be positive for example.

when you have a group of radiobuttons, you have just 1 variable for it, assuming it's an integer...
default value = -1, none selected.
all the buttons will have a value of 0 or higher.

so, just check the variable, if the value is 0 or higher, if not, none is selected...

But Marin is correct, this seems to be the odd-one-out when it comes to validations, including the fact that Radio Button(s) can't be marked invalid or show a validation message like the rest of the inputs. Any custom validation we come up with, will also need to include a custom way of showing the error.

I agree particularly when server side feedback messages are not 'accessible'