form
form copied to clipboard
Allow numbers as valid values for radio and checkbox inputs
Here: https://github.com/react-tools/react-form/blob/master/src/components/form-fields/Radio.js#L49
Is there a reason why only string values are permitted?
I believe in html radio buttons and check boxes only accept string values (if you use an int its converted to a string).
Using React you should actually be able to store an int, or object, or anything else with a radiobox.
However if the radiobox is suppose to behave the same as its html counterpart it should only accept a string.
Agree with @ro-savage. In terms of accessibility, its best not to deviate from HTML standards. Closing as I will not be changing this.