6.0.0-beta1
7/4/25

[#14235] Extend regex for phone number validation with no-break space
Summary Extend regex for phone number validation with no-break space
Queue Horde Framework Packages
Type Enhancement
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester marth (at) tsvschlieben (dot) de
Created 02/01/2016 (3441 days ago)
Due
Updated 02/04/2016 (3438 days ago)
Assigned
Resolved 02/04/2016 (3438 days ago)
Milestone
Patch No

History
02/04/2016 06:37:14 PM Michael Rubinsky Comment #4
Version ⇒
Queue ⇒ Horde Framework Packages
Reply to this comment
Fix is in Horde_Form
02/04/2016 06:36:41 PM Michael Rubinsky Comment #3
Assigned to Michael Rubinsky
State ⇒ Resolved
Version ⇒ Git master
Reply to this comment
Fixed in Git by using the u flag with \s:

'/^\+?[\d()\-\/.\s]*$/u'



02/04/2016 06:35:47 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 4ee8e707a72353bfc6e26f3c41614c01adc4bfda
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Feb 4 13:35:03 2016 -0500

     Bug: 14235  Allow the unicode nbsp character to match.

  framework/Form/lib/Horde/Form/Type.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://github.com/horde/horde/commit/4ee8e707a72353bfc6e26f3c41614c01adc4bfda
02/01/2016 02:52:34 PM marth (at) tsvschlieben (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Extend regex for phone number validation with no-break space
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
State ⇒ New
Reply to this comment
iOS uses no-break spaces (U+00A0) in phone numbers. After syncing your 
contacts to horde, this leads always to an error message ("You must 
enter a valid phone number, digits only with an optional '+' for the 
international dialing prefix.") when you try to edit a contact in Turba.
Extending the validation regex to something like '/^\+?[\d()\-\/. 
\x{00A0}]*$/u' in Horde/Form/Type.php might solve the problem.

Saved Queries