Skip to content

Commit a64e628

Browse files
author
thom
committed
Allow empty fields (#5809)
1 parent 2201b7a commit a64e628

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/web/admin/form/firewall.tform.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
'datatype' => 'VARCHAR',
7777
'formtype' => 'TEXT',
7878
'validators' => array ( 0 => array ( 'type' => 'REGEX',
79-
'regex' => '/^\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
79+
'regex' => '/^$|\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
8080
'errmsg'=> 'tcp_ports_error_regex'),
8181
),
8282
'default' => '20,21,22,25,53,80,110,143,443,465,587,993,995,3306,8080,8081,10000',
@@ -88,7 +88,7 @@
8888
'datatype' => 'VARCHAR',
8989
'formtype' => 'TEXT',
9090
'validators' => array ( 0 => array ( 'type' => 'REGEX',
91-
'regex' => '/^\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
91+
'regex' => '/^$|\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
9292
'errmsg'=> 'udp_ports_error_regex'),
9393
),
9494
'default' => '53,3306',

0 commit comments

Comments
 (0)