From ac0fcaa406c6fc0e9327a8f710f59480e91f4f7a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 22 Sep 2023 10:37:14 +0200 Subject: [PATCH] mvc: remove special validation messages likely never seen We could use defaultValidationMessage() but the BaseListField message is fitting enough and the GUI itself cannot cause this to happen. The reason for stripping is also that the variable is not handled by the field so there is no special validation meaning attached either. For BaseField derivates the idea was to set a custom required validation message which is no longer possible or possibly not even reachable. --- .../OPNsense/Base/FieldTypes/AuthenticationServerField.php | 5 ----- .../OPNsense/Base/FieldTypes/ConfigdActionsField.php | 5 ----- .../OPNsense/Firewall/FieldTypes/AliasContentField.php | 7 ------- .../models/OPNsense/Firewall/FieldTypes/AliasNameField.php | 5 ----- 4 files changed, 22 deletions(-) diff --git a/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/AuthenticationServerField.php b/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/AuthenticationServerField.php index df22df8d1..2f55b99b4 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/AuthenticationServerField.php +++ b/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/AuthenticationServerField.php @@ -51,11 +51,6 @@ class AuthenticationServerField extends BaseListField */ private $internalCacheKey = '*'; - /** - * @var string default validation message string - */ - protected $internalValidationMessage = "please specify a valid authentication server"; - /** * generate validation data (list of AuthServers) */ diff --git a/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ConfigdActionsField.php b/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ConfigdActionsField.php index 192a91c9e..976984b5c 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ConfigdActionsField.php +++ b/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ConfigdActionsField.php @@ -41,11 +41,6 @@ class ConfigdActionsField extends BaseListField */ private static $internalStaticOptionList = array(); - /** - * @var string default validation message string - */ - protected $internalValidationMessage = "please specify a valid action"; - /** * @var array filters to use on the configd selection */ diff --git a/src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/AliasContentField.php b/src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/AliasContentField.php index 413e1bc27..f89416090 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/AliasContentField.php +++ b/src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/AliasContentField.php @@ -47,11 +47,6 @@ class AliasContentField extends BaseField */ protected $internalIsContainer = false; - /** - * @var string default validation message string - */ - protected $internalValidationMessage = "alias name required"; - /** * @var array list of known countries */ @@ -82,7 +77,6 @@ class AliasContentField extends BaseField return $result; } - /** * split and yield items * @param array $data to validate @@ -344,7 +338,6 @@ class AliasContentField extends BaseField } return $messages; } - // /** * retrieve field validators for this field type diff --git a/src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/AliasNameField.php b/src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/AliasNameField.php index ea7f28dd1..0765bb6aa 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/AliasNameField.php +++ b/src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/AliasNameField.php @@ -44,11 +44,6 @@ class AliasNameField extends BaseField */ protected $internalIsContainer = false; - /** - * @var string default validation message string - */ - protected $internalValidationMessage = "alias name required"; - /** * retrieve field validators for this field type * @return array returns list of validators