diff --git a/user_personal.php b/user_personal.php index be289c45..c9377a71 100644 --- a/user_personal.php +++ b/user_personal.php @@ -52,20 +52,20 @@ 'cpr' => array ('name' => 'CPR Training', 'type' => 'yesno'), 'phonehome' => array('name' => 'Phone (Home)', - 'regexp' => '/^[1-9][0-9]{2}-[1-9][0-9]{2}-[0-9]{4}( x[0-9]{1,5})?$/', - 'format' => '\'NNN-NNN-NNNN\' or \'NNN-NNN-NNNN xEXT\'',), + 'regexp' => '/^[1-9][0-9]{2}-?[1-9][0-9]{2}-?[0-9]{4}( x[0-9]{1,5})?$/', + 'format' => '\'NNN-NNN-NNNN\' or \'NNNNNNNNNN\' or \'NNN-NNN-NNNN xEXT\''), 'phonecell' => array('name' => 'Phone (Cell)', - 'regexp' => '/^[1-9][0-9]{2}-[1-9][0-9]{2}-[0-9]{4}$/', - 'format' => '\'NNN-NNN-NNNN\'',), + 'regexp' => '/^[1-9][0-9]{2}-?[1-9][0-9]{2}-?[0-9]{4}$/', + 'format' => '\'NNN-NNN-NNNN\' or \'NNNNNNNNNN\''), 'phonework' => array('name' => 'Phone (Work)', - 'regexp' => '/^[1-9][0-9]{2}-[1-9][0-9]{2}-[0-9]{4}( x[0-9]{1,5})?$/', - 'format' => '\'NNN-NNN-NNNN\' or \'NNN-NNN-NNNN xEXT\'',), + 'regexp' => '/^[1-9][0-9]{2}-?[1-9][0-9]{2}-?[0-9]{4}( x[0-9]{1,5})?$/', + 'format' => '\'NNN-NNN-NNNN\' or \'NNNNNNNNNN\' or \'NNN-NNN-NNNN xEXT\''), 'fax' => array('name' => 'Fax', - 'regexp' => '/^[1-9][0-9]{2}-[1-9][0-9]{2}-[0-9]{4}$/', - 'format' => '\'NNN-NNN-NNNN\'',), + 'regexp' => '/^[1-9][0-9]{2}-?[1-9][0-9]{2}-?[0-9]{4}$/', + 'format' => '\'NNN-NNN-NNNN\' OR \'NNNNNNNNNN\''), 'postalcode' => array('name' => $config['postalzip'], - 'regexp' => '/^(([A-Za-z][0-9][A-Za-z]( )?[0-9][A-Za-z][0-9])|([0-9]{5}))$/', - 'format' => '\'ANA NAN\' or \'ANANAN\' or \'NNNNN\'',), + 'regexp' => '/^(([A-Z][0-9][A-Z]( )?[0-9][A-Z][0-9])|([0-9]{5}))$/i', + 'format' => '\'ANA NAN\' or \'ANANAN\' or \'NNNNN\''), );