NewOldMax / react-form-validator-core

Core validator component for react forms
MIT License
95 stars 44 forks source link

multiple custom validators #48

Closed cdkisa closed 5 years ago

cdkisa commented 5 years ago

was checking out this package but noticed if you have more than one custom validator, there is a warning logged in the console.

example: https://codesandbox.io/s/9l94nrqrnw

Possible Unhandled Promise Rejection: TypeError: _ValidationRules2.default[name] is not a function at Function.ValidatorForm.getValidator (ValidatorForm.js?5676:198) at eval (ValidatorForm.js?5676:131) at Array.map (<anonymous>) at eval (ValidatorForm.js?5676:130) at doResolve (index.js?305e:129) at new Promise (index.js?305e:33) at ValidatorForm._this.validate (ValidatorForm.js?5676:123) at eval (ValidatorForm.js?5676:112) at doResolve (index.js?305e:129) at new Promise (index.js?305e:33)

NewOldMax commented 5 years ago

Hi you have an error in passwordMatchesRidiculousRules validation rule. There is no contains method. Do you mean includes?