mikeerickson / validatorjs

A data validation library in JavaScript for the browser and Node.js, inspired by Laravel's Validator.
https://www.npmjs.com/package/validatorjs
MIT License
1.77k stars 280 forks source link

Validator.registerAsync() argument message should be optional #463

Open sdr0x07b6 opened 1 year ago

sdr0x07b6 commented 1 year ago

What version of this package are you using?

What operating system, Node.js, and npm version?

What happened? In the documentation, Validator.registerAsync() is passed two arguments. However, the same implementation will point out that the third argument is not specified.

(method) Validator.ValidatorStatic.registerAsync(name: string, fn: Validator.RegisterAsyncCallback, message: string): void
Three arguments are required, but two were specified. ts(2554)
index.d.ts(69, 13): 'message' argument not specified.

What did you expect to happen? I think the third argument message should be optional.

Are you willing to submit a pull request to fix this bug? I don't know how to contribute to @types