File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class FirewallAlias extends Model {
4949 default: [],
5050 allow_empty: true ,
5151 many: true ,
52+ many_maximum: 0 , // Do not enforce a maximum number of entries
5253 delimiter: ' ' ,
5354 help_text: "Sets the host, network or port entries for the alias. When `type` is set to `host`, each
5455 entry must be a valid IP address or FQDN. When `type` is set to `network`, each entry must be a valid
@@ -59,6 +60,7 @@ class FirewallAlias extends Model {
5960 default: [],
6061 allow_empty: true ,
6162 many: true ,
63+ many_maximum: 0 , // Do not enforce a maximum number of entries
6264 delimiter: '|| ' ,
6365 help_text: "Sets descriptions for each alias `address`. Values must match the order of the `address`
6466 value it relates to. For example, the first value specified here is the description for the first
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class LengthValidator extends RESTAPI\Core\Validator {
4444 );
4545 }
4646 # Throw an error if the string contains more characters than the specified maximum
47- if (strlen ($ value ) > $ this ->maximum ) {
47+ if ($ this -> maximum and strlen ($ value ) > $ this ->maximum ) {
4848 throw new ValidationError (
4949 message: "Field ' $ field_name' exceeds the maximum character length of $ this ->maximum . " ,
5050 response_id: 'LENGTH_VALIDATOR_MAXIMUM_CONSTRAINT ' ,
@@ -61,7 +61,7 @@ class LengthValidator extends RESTAPI\Core\Validator {
6161 );
6262 }
6363 # Throw an error if the array contains more array entries than the specified maximum
64- if (count ($ value ) > $ this ->maximum ) {
64+ if ($ this -> maximum and count ($ value ) > $ this ->maximum ) {
6565 throw new ValidationError (
6666 message: "Field ' $ field_name' exceeds the maximum array length of $ this ->maximum . " ,
6767 response_id: 'LENGTH_VALIDATOR_MAXIMUM_CONSTRAINT ' ,
You can’t perform that action at this time.
0 commit comments