Problem/Motivation

The module validates the value "0" as valid since it never considers it a value to check

Steps to reproduce

- have a webform with the webform IBAN field.
- test or enter a value of "0" into it.
- Validator accepts it as a valid IBAN.

Proposed resolution

Patch wioll change the logic to check for having the field with hasfield.

Remaining tasks

Review Patch

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    1 hidden branch
  • 2.x Comparechanges, plain diff MR !3

Comments

sysosmaster created an issue. See original summary.

sysosmaster’s picture

Title: Iban field validation wrongly accepts '0' as a valid entry. » IBAN field validation wrongly accepts '0' as a valid entry.
sysosmaster’s picture

Assigned: sysosmaster » Unassigned
Status: Active » Needs review

joshahubbers’s picture

Sorry for the delay. I have been messing around a bit. Your suggestion works well for the single field. But while testing I noticed that the validation of the multiple field never has worked. Auch!

So I altered the code, to check for 0, and also make all validations work. I also adjusted the tests to get them to work.

  • joshahubbers committed e3c98e18 on 2.x
    git commit -m 'Issue #3534883 by sysosmaster, joshahubbers: IBAN field...

joshahubbers’s picture

Status: Needs review » Fixed
joshahubbers’s picture

I did however add a commit to credit your contribution. Thank you for your time.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.