-
Notifications
You must be signed in to change notification settings - Fork 19
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
Validations on dynamic added fields, show property remains false(always) even if there is an error #50
Comments
@harshitchaudhary I am glad you like the library. To solve the problem you described: You are right, I think you will need to explicitly specify the name of the field/fields validated by each of your validations, using more verbose config, like this one:
Please look at this part of the documentation for explanation and more details: https://github.com/vacuumlabs/react-custom-validation#validationsfields-optional Also, you will need to use the Hope this helps. If you have any other questions, or if this does not solve your problem, let me know! |
Also, you will need to use the $field helper (if you have not already)
onChange function within
And this is how I am handling it in fieldChange function
State and everything is being updated, I know I have some problem in the fields part of this snippet (copied from original question)
Also it will be great if you can explain this as well in your example 3 I tried your way and It was still showing show property as false. |
I have a form where in as soon as I check a checkbox couple of more fields loads which require validations so I tried you library which is working great, There is small glitch on my end as far as I know, that show property of $validation remains false always.
Here is my validationConfig function
Looking for help in order to resolve this particular issue. I tried using $validation.isValid property but it shows error by default which is expected as well.
The text was updated successfully, but these errors were encountered: