Skip to content
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

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

Open
sdr0x07b6 opened this issue Feb 27, 2023 · 0 comments
Open

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

sdr0x07b6 opened this issue Feb 27, 2023 · 0 comments

Comments

@sdr0x07b6
Copy link
Contributor

What version of this package are you using?

  • validatorjs 3.22.1
  • @types/validatorjs 3.15.0

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

  • Node v18.14.2
  • macOS 12.6.2

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant