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

Validate character set for BICs #364

Merged
merged 3 commits into from
Mar 3, 2019
Merged

Validate character set for BICs #364

merged 3 commits into from
Mar 3, 2019

Conversation

raphaelm
Copy link
Contributor

Hi,

we've noted that a lot of our users try to input spaces into the BIC field and then run into the maxlength attribute silently. For example, if they want to input DEUTDEFFXXX, they end up inputting DEUTDEFF XX. As I understand SWIFT, all BICs are alphanumeric, even the branch codes. Therefore, I suggest

  • validating that all BICs only contain letters and numbers.

  • auto-removing spaces from form input

  • Add an entry to the docs/changelog.rst describing the change.

  • Add an entry for your name in the docs/authors.rst file if it's not
    already there.´

@codecov-io
Copy link

codecov-io commented Feb 26, 2019

Codecov Report

Merging #364 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #364      +/-   ##
==========================================
+ Coverage   95.93%   95.93%   +<.01%     
==========================================
  Files         157      157              
  Lines        3981     3983       +2     
  Branches      523      524       +1     
==========================================
+ Hits         3819     3821       +2     
  Misses         98       98              
  Partials       64       64
Impacted Files Coverage Δ
localflavor/generic/forms.py 100% <100%> (ø) ⬆️
localflavor/generic/validators.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00fe4ec...0eca782. Read the comment docs.

@benkonrath
Copy link
Member

Thanks for your contribution and for providing valuable insight into the problem that some users were running into with the validation. The PR looks good!

@benkonrath benkonrath merged commit c08ff34 into django:master Mar 3, 2019
@raphaelm raphaelm deleted the bicval branch March 3, 2019 21:36
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

Successfully merging this pull request may close these issues.

3 participants