Skip to content

Commit b38ec6d

Browse files
committed
allow empty hostname field for several dns record types.
1 parent 0461869 commit b38ec6d

File tree

7 files changed

+14
-28
lines changed

7 files changed

+14
-28
lines changed

interface/web/dns/form/dns_a.tform.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@
7777
'name' => array (
7878
'datatype' => 'VARCHAR',
7979
'formtype' => 'TEXT',
80-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
81-
'errmsg'=> 'name_error_empty'),
82-
1 => array ( 'type' => 'REGEX',
83-
'regex' => '/^[\w\.\-\*]{1,64}$/',
80+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
81+
'regex' => '/^[\w\.\-\*]{0,64}$/',
8482
'errmsg'=> 'name_error_regex'),
8583
),
8684
'default' => '',

interface/web/dns/form/dns_cname.tform.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@
7777
'name' => array (
7878
'datatype' => 'VARCHAR',
7979
'formtype' => 'TEXT',
80-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
81-
'errmsg'=> 'name_error_empty'),
82-
1 => array ( 'type' => 'REGEX',
83-
'regex' => '/^[\w\.\-]{1,64}$/',
80+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
81+
'regex' => '/^[\w\.\-]{0,64}$/',
8482
'errmsg'=> 'name_error_regex'),
8583
),
8684
'default' => '',

interface/web/dns/form/dns_mx.tform.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@
7777
'name' => array (
7878
'datatype' => 'VARCHAR',
7979
'formtype' => 'TEXT',
80-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
81-
'errmsg'=> 'name_error_empty'),
82-
1 => array ( 'type' => 'REGEX',
83-
'regex' => '/^[\w\.\-]{1,255}$/',
80+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
81+
'regex' => '/^[\w\.\-]{0,255}$/',
8482
'errmsg'=> 'name_error_regex'),
8583
),
8684
'default' => '',

interface/web/dns/form/dns_ns.tform.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@
7777
'name' => array (
7878
'datatype' => 'VARCHAR',
7979
'formtype' => 'TEXT',
80-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
81-
'errmsg'=> 'name_error_empty'),
82-
1 => array ( 'type' => 'REGEX',
83-
'regex' => '/^[\w\.\-]{1,64}$/',
80+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
81+
'regex' => '/^[\w\.\-]{0,64}$/',
8482
'errmsg'=> 'name_error_regex'),
8583
),
8684
'default' => '',

interface/web/dns/form/dns_rp.tform.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@
7777
'name' => array (
7878
'datatype' => 'VARCHAR',
7979
'formtype' => 'TEXT',
80-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
81-
'errmsg'=> 'name_error_empty'),
82-
1 => array ( 'type' => 'REGEX',
83-
'regex' => '/^[\w\.\-]{1,64}$/',
80+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
81+
'regex' => '/^[\w\.\-]{0,64}$/',
8482
'errmsg'=> 'name_error_regex'),
8583
),
8684
'default' => '',

interface/web/dns/form/dns_srv.tform.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@
7777
'name' => array (
7878
'datatype' => 'VARCHAR',
7979
'formtype' => 'TEXT',
80-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
81-
'errmsg'=> 'name_error_empty'),
82-
1 => array ( 'type' => 'REGEX',
83-
'regex' => '/^[\w\.\-]{1,64}$/',
80+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
81+
'regex' => '/^[\w\.\-]{0,64}$/',
8482
'errmsg'=> 'name_error_regex'),
8583
),
8684
'default' => '',

interface/web/dns/form/dns_txt.tform.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@
7777
'name' => array (
7878
'datatype' => 'VARCHAR',
7979
'formtype' => 'TEXT',
80-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
81-
'errmsg'=> 'name_error_empty'),
82-
1 => array ( 'type' => 'REGEX',
83-
'regex' => '/^[\w\.\-]{1,64}$/',
80+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
81+
'regex' => '/^[\w\.\-]{0,64}$/',
8482
'errmsg'=> 'name_error_regex'),
8583
),
8684
'default' => '',

0 commit comments

Comments
 (0)