zackify / validify

Simple-as-possible React form validation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement onValue as an alternative to onValues

u840903 opened this issue · comments

Would it be possible to implement the property onValue as an alternative to onValues? I'm thinking something like this:

onValue
exposes a key and value on change, you must manage the form state by passing in values if using this. Ex: values={this.state.values} must be passed too, if using the example below)

onValue={(key, value) => this.setState(() => ([key]:value))}

Also...Thanks for a great component!

Check out this release, I added it here. Waiting for a few people to test the 3.0.0 before making it stable https://github.com/navjobs/validify/releases/tag/3.0.0-beta.2

3.0.0 is live so lmk if there's any issues, closing this for now