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
Python stdnum library has this prefix validation:
if (number[:2] < '01' or number[:2] > '24') and (number[:2] not in ('30', '50')): raise InvalidComponent() # invalid province code
This package has this:
export function validPrefix(value: string): boolean { const prefix = parseInt(value.substr(0, 2), 10); if (prefix === 0 || prefix > 24 || prefix === 30 || prefix === 50) { // Invalid province return false; } return true; }
Should be:
export function validPrefix(value: string): boolean { const prefix = parseInt(value.substr(0, 2), 10); if ((prefix === 0 || prefix > 24) && !(prefix === 30 || prefix === 50)) { // Invalid province return false; } return true; }
The text was updated successfully, but these errors were encountered:
Fixing with #125
Sorry, something went wrong.
The fix is now merged, again thanks for finding the issue.
No branches or pull requests
Python stdnum library has this prefix validation:
This package has this:
Should be:
The text was updated successfully, but these errors were encountered: