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 ;-) )

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BuFr’s picture

good job bami, works! i was looking for this. Not a typical Drupal patch but easy to implement.

g1smd’s picture

The 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?

g1smd’s picture

I am rewriting the whole NL module and will submit a separate patch with this and many other issues fixed.

h3rj4n’s picture

following

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).

g1smd’s picture

I 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.

rfsbsb’s picture

Hi @g1smd could you please submit the changes you've made? I'm co maintaining this module and any help would be very welcome.