NewOldMax / react-form-validator-core

Core validator component for react forms
MIT License
94 stars 44 forks source link

Support for radio type #22

Closed Ryu13 closed 6 years ago

Ryu13 commented 6 years ago

Is there planned support for radio type (or perhaps something I'm missing in what's currently available)?

In the source, it looks like your forcibly looking at value, value = _input$props.value, in ValidateForm.js.

Is there a plan to allow a prop to specify a key (naturally defaulted to "value") such as 'checked'.

However, it looks like you probablyhave to either:

  1. look at the actual dom element instead of the component element. or 2. force the named prop to also be present as a property.
NewOldMax commented 6 years ago

Sorry, no plans for custom value keys support. Anyway you should implement your checkbox validator by exending ValidatorComponent, right? So in any case you can map your checked and value to whatever you want