Open artshevtsov opened 5 years ago
We are encountering the same issue. The form requires to fill in a field that has other rules but does not have the required
rule as true.
The solution you proposed works as expected. I will be creating a PR for it
Pull request #34 fixes this.
Which has been merged to master on commit 3952e3230d81edbbb432e7eb7d50e4ae34a90ed4
I'm going to publish a new npm release tomorow ! Thx guys 👍
No problem. Thanks for reviewing and merging so quickly !
Looking forward to the release !
From: TibTib notifications@github.com Reply-To: perscrew/react-native-form-validator reply@reply.github.com Date: Wednesday, October 16, 2019 at 4:33 PM To: perscrew/react-native-form-validator react-native-form-validator@noreply.github.com Cc: "Prasoon, Shikhar" sprasoon@quickbase.com, Comment comment@noreply.github.com Subject: Re: [perscrew/react-native-form-validator] Skipping not required fields validation if the field is empty (#25)
I'm going to publish a new npm release tomorow ! Thx guys 👍
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/perscrew/react-native-form-validator/issues/25?email_source=notifications&email_token=AB3E6WC553DUV4OGUG26XJTQO53ATA5CNFSM4GQLOHM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBN26XQ#issuecomment-542879582, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB3E6WBDMXI65XHOYRQE6NTQO53ATANCNFSM4GQLOHMQ.
This message and its contents are confidential. If you received this message in error, do not use or rely upon it. Instead, please inform the sender and then delete it. Thank you.
I fixed _checkRules function a little bit - if the field is empty and not required there should be no errors, for example that email is not valid or something else