|
Expanding Valid Characters in Phone Fields |
|
|
|
|
Written by John Button
|
|
Monday, 11 August 2008 |
|
A description of how to modify the allowable characters in the phone field. By default, in Horde v.3.2+, only a leading '+', digits, '-', and space are allowable.
Any field of type "phone" is check for valid characters in the file lib/Horde/Form.php where the phone type is defined. This is found near line 1236 in the file. To make changes, locate the default validation line: $valid = preg_match('/^\+?[\d()\-\/ ]*$/', $value);
Change the validation character string as desired. For example, to add '*', '#' and '.' as valid characters, modify as follows: $valid = preg_match('/^\+?[\d()\*\.\#\-\/ ]*$/', $value); |
|
Last Updated ( Monday, 11 August 2008 )
|