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

isAlpha function does not accept an options argument #1717

Closed
skylerknight opened this issue Aug 29, 2021 · 4 comments
Closed

isAlpha function does not accept an options argument #1717

skylerknight opened this issue Aug 29, 2021 · 4 comments
Labels

Comments

@skylerknight
Copy link

skylerknight commented Aug 29, 2021

isAlpha method doesn't accept options argument

The documentation states that the isAlpha function accepts a locale and an options argument with an ignore key, but the code does not reflect this.

Examples

Screen Shot 2021-08-29 at 1 13 48 PM

Screen Shot 2021-08-29 at 1 17 01 PM

Additional context

Validator.js version: ^13.6.0
Node.js version: 16.1.0
OS platform: macOS

@fedeci
Copy link
Contributor

fedeci commented Aug 30, 2021

It does

export default function isAlpha(_str, locale = 'en-US', options = {}) {
, those are probably outdated type definitions.

@skylerknight
Copy link
Author

skylerknight commented Aug 30, 2021

That was indeed the case. Thank you for pointing that out.

It looks like the issue is with the @types/validator from the DefininitelyTyped/types/validator repo.

I will repost the issue there.

@fedeci
Copy link
Contributor

fedeci commented Aug 30, 2021

I suspect that @types/validator is outdated in many parts. There was an issue about adding types directly here #1271

@skylerknight
Copy link
Author

skylerknight commented Aug 30, 2021

You are correct. Thank you.

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

No branches or pull requests

2 participants