-
Notifications
You must be signed in to change notification settings - Fork 302
Fix REGON validation #529
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
Fix REGON validation #529
Conversation
- Fix regon length regex - Fix regon validation for 14 digits
docs/changelog.rst
Outdated
- Allow formatted IBANs longer than 26 chars to be saved in `IBANField` | ||
(`gh-522 <https://github.com/django/django-localflavor/pull/522>`_). | ||
- Fix REGON validation for PL | ||
(`gh-529 <https://github.com/django/django-localflavor/pull/529>`_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.0 has been released, please add your note under the 5.1 section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that, fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good!
@benkonrath, do you want to have a quick look before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
Fixed validation, because regex currently allows for strings from 9 to 14 digits, but only fixed 9 digits or 14 digits should be allowed. Additionally the checksum validation for last digit case (where modulo of checksum is equal 10) is handled incorrectly for 14 digits length string.