We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What version of this package are you using? ^3.22.1
What operating system, Node.js, and npm version? macOs, v18.10.0, 8.19.2
What happened?
let Validator = require('validatorjs');
Validator(obj, { attribute: 'required|string', allow: 'required|boolean', values: 'required|array', }) not working TypeError: this.setAttributeFormatter is not a function at Validator (validator.js:18:8) Try this: let Validator = require('validatorjs'); Validator.setAttributeFormatter(function(attribute) { return attribute.replace(/_/g, ' '); }); Validator(obj, { attribute: 'required|string', allow: 'required|boolean', values: 'required|array', })
not working
TypeError: this.setAttributeFormatter is not a function at Validator (validator.js:18:8)
What did you expect to happen? What did i do wrong? May be in Basic Usage skipped some information?
Are you willing to submit a pull request to fix this bug? Not sure
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What version of this package are you using? ^3.22.1
What operating system, Node.js, and npm version? macOs, v18.10.0, 8.19.2
What happened?
let Validator = require('validatorjs');
not working
What did you expect to happen?
What did i do wrong? May be in Basic Usage skipped some information?
Are you willing to submit a pull request to fix this bug?
Not sure
The text was updated successfully, but these errors were encountered: