Skip to content

Conversation

@kennicefung
Copy link

@kennicefung kennicefung commented Nov 2, 2019

This version has added iteration for looking into the children of this.state, so that we can validate nested this.state.
For example, say we have:
this.state={ data:{ email:'' } }

In terms of the usage:
this.validate({ data:{ email: { email: true, required: true } } })

For rendering error, we could use "data.email":
{this.isFieldInError('data.email') && this.getErrorsInField('data.email').map(errorMessage => <Text>{errorMessage}</Text>) }

@anshulchauhan70
Copy link

@perscrew is it worth using above PR ?
If Yes Please merge it

@perscrew
Copy link
Owner

perscrew commented Mar 4, 2022

@perscrew is it worth using above PR ? If Yes Please merge it

This library has been completely rewritten in typescript. I prefer to work on https://github.com/perscrew/react-simple-form-validator and start a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants