Skip to content
Snippets Groups Projects
Commit 20c7c380 authored by tbrehm's avatar tbrehm
Browse files

Improved IP regex check. Thanks to jdemarchi for the patch.

parent fdb51429
No related branches found
No related tags found
2 merge requests!46Master,!21Master
......@@ -100,7 +100,7 @@ $form["tabs"]['dns'] = array (
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'data_error_empty'),
1 => array ( 'type' => 'REGEX',
'regex' => '/^[0-9\.]{7,15}$/',
'regex' => '/^([1-9]{1}|[1-9]\d|[1]\d\d|2[0-4]\d|25[0-5])\.(\d{1}|[1-9]\d|[1]\d\d|2[0-4]\d|25[0-5])\.(\d{1}|[1-9]\d|[1]\d\d|2[0-4]\d|25[0-5])\.(\d{1}|[1-9]\d|[1]\d\d|2[0-4]\d|25[0-5])$/',
'errmsg'=> 'data_error_regex'),
),
'default' => '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment