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

isBase32 returns false for valid Base32 string #2000

Closed
petermarks12 opened this issue Jul 14, 2022 · 6 comments
Closed

isBase32 returns false for valid Base32 string #2000

petermarks12 opened this issue Jul 14, 2022 · 6 comments
Labels

Comments

@petermarks12
Copy link

I have tried with the following string and also other base32 valid strings, i am always getting false, no matter what.

Encoded: d1jprv3f41vpywkccg

Decoded: hello world

var validator = require("validator")

validator.isBase32('d1jprv3f41vpywkccg') // returns false

@0xHaku
Copy link

0xHaku commented Jul 16, 2022

It seems that there are two problems with your input.

  1. The clockford option needs to be set to true
  2. Input must be uppercase

Please check again.

@petermarks12
Copy link
Author

It still returns false. I tried

validator.isBase32('D1JPRV3F41VPYWKCCG',{ crockford:true })

@0xHaku
Copy link

0xHaku commented Jul 17, 2022

I checked node_modules and the crockford option is not yet distributed with 13.7.0

@profnandaa
When is #1888 scheduled to be released?

@rubiin
Copy link
Member

rubiin commented Jul 18, 2022

It will get realease once we are done with PRs. there are bunch of them which are still to be reviewed :)

@parasg1999
Copy link
Contributor

Seems like this one is done! Can we please close this?

@pano9000
Copy link
Contributor

closing, as this has been fixed/added with commit cf8dcea / #1888

will be part of the next release

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

5 participants