Fix regex

This commit is contained in:
Eike Foken
2011-08-10 20:33:48 +02:00
parent c79f3eb47a
commit 8021c167f6

View File

@@ -67,7 +67,7 @@ class Users extends MY_Controller {
array( array(
'field' => 'phone', 'field' => 'phone',
'label' => 'lang:field_phone', 'label' => 'lang:field_phone',
'rules' => 'trim|regex_match[/^\+\d{2,4}\w\d{2,4}\w\d{3,10}+$/i]', 'rules' => 'trim|regex_match[/^\+\d{2,4}\s\d{2,4}\s\d{3,10}+$/i]',
) )
); );
$this->form_validation->set_rules($config); $this->form_validation->set_rules($config);
@@ -127,7 +127,7 @@ class Users extends MY_Controller {
array( array(
'field' => 'phone', 'field' => 'phone',
'label' => 'lang:field_phone', 'label' => 'lang:field_phone',
//'rules' => 'trim|regex_match[/^\+\d{2,4}\w\d{2,4}\w\d{3,10}+$/i]', 'rules' => 'trim|regex_match[/^\+\d{2,4}\s\d{2,4}\s\d{3,10}+$/i]',
) )
); );
$this->form_validation->set_rules($config); $this->form_validation->set_rules($config);