Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to add custom validators #18

Open
iamhaaamed opened this issue Jul 27, 2018 · 3 comments
Open

how to add custom validators #18

iamhaaamed opened this issue Jul 27, 2018 · 3 comments

Comments

@iamhaaamed
Copy link

Hi,
How can I add custom validators to react-native-form-validator?

@vocampos
Copy link

[2] How can I add custom validators to react-native-form-validator?

@wodka
Copy link
Contributor

wodka commented Apr 5, 2019

Easy way it to extend the validate function and add the checks yourself and then add the errors:

this.messages['en']['my_error_name'] = 'field {0} had my error with {1}'
this._addError('some_field', 'my_error','data')

@wodka
Copy link
Contributor

wodka commented Mar 13, 2020

first of - don't ping people to provide you with examples for your work.
second - go through the code and look at the validator function

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

No branches or pull requests

3 participants