Portfield validation, missed a spot in https://github.com/opnsense/core/issues/2916

This commit is contained in:
Ad Schellevis 2018-11-19 12:37:32 +01:00
parent f5577bed58
commit 8c52aa1964

View File

@ -149,8 +149,10 @@ class PortField extends BaseField
{
$validators = parent::getValidators();
if ($this->internalValidationMessage == null) {
$msg = "please specify a valid port number (1-65535) or name (" . implode(",", self::$wellknownservices) .
")";
$msg = "please specify a valid port number (1-65535)";
if ($this->enableWellKown) {
$msg .= " or name (" . implode(",", self::$wellknownservices) . ")";
}
} else {
$msg = $this->internalValidationMessage;
}