chenglou / react-radio-group

Better radio buttons.
MIT License
445 stars 75 forks source link

Indicate selection as required? #43

Open andomain opened 7 years ago

andomain commented 7 years ago

Great component! Was just thinking it would be cool to maybe include some way of duplicating the 'required' functionality within a static HTML5 form? The bare minimum is one of the radio inputs within a namespace/group having the attribute but it is suggested they all have it just just for consistency. This can be currently achieved by adding the required attribute to the <Radio> children nodes, however it would be nice to specify it on the RadioGroup to match all the other API props?

Happy to look into this and create a PR if you agree?