Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The current regex for dutch phone numbers requires either a hyphen or a space between the numbers, while both should be optional. Including patch (please go easy on me - it's my first patch ;-) )
Comment | File | Size | Author |
---|---|---|---|
#4 | 1585990-space-optional.patch | 2.59 KB | h3rj4n |
phone.nl_.inc_.patch | 2.91 KB | babipanghang | |
Comments
Comment #1
BuFr CreditAttribution: BuFr commentedgood job bami, works! i was looking for this. Not a typical Drupal patch but easy to implement.
Comment #2
g1smd CreditAttribution: g1smd commentedThe RegEx is a bit inefficient:
[0]{1} simplifies to 0
[6]{1} simplifies to 6
[-\s]* allows multiple hypens and spaces, would [\s-]? be better for one?
[1-9]{1} simplifies to [1-9]
[0-9]{1} simplifies to [0-9]
[\s]* allows multiple spaces, would \s? be better here?
Comment #3
g1smd CreditAttribution: g1smd commentedI am rewriting the whole NL module and will submit a separate patch with this and many other issues fixed.
Comment #4
h3rj4n CreditAttribution: h3rj4n commentedfollowing
g1smd, I added a patch that allows a 06 without any spaces or dash. Validation didn't allow 0612345678. Only 06-[number] or 06 [number] (with space).
Comment #5
g1smd CreditAttribution: g1smd commentedI have rewritten the enire NL module with this issue and many other issues fixed. The code is completely different to the old code. When the module owner returns, or we get additional committers, I'll submit it.
Comment #6
rfsbsbHi @g1smd could you please submit the changes you've made? I'm co maintaining this module and any help would be very welcome.