mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
routing/gateways: Fix ipv4 and ipv6 validation not being displayed in the gateway form (#8060)
This commit is contained in:
parent
41d8cf30c9
commit
3b54ba517f
@ -62,9 +62,9 @@ class Gateways extends BaseModel
|
||||
if (empty((string)$gateway->$key) || (string)$gateway->$key == 'dynamic') {
|
||||
continue;
|
||||
} elseif ((string)$gateway->ipprotocol === 'inet' && !Util::isIpv4Address((string)$gateway->$key)) {
|
||||
$messages->appendMessage(new Message(gettext('Invalid IPv4 address'), $ref . '.' . $tag));
|
||||
$messages->appendMessage(new Message(gettext('Invalid IPv4 address'), $ref . '.' . $key));
|
||||
} elseif ((string)$gateway->ipprotocol === 'inet6' && !Util::isIpv6Address((string)$gateway->$key)) {
|
||||
$messages->appendMessage(new Message(gettext('Invalid IPv6 address'), $ref . '.' . $tag));
|
||||
$messages->appendMessage(new Message(gettext('Invalid IPv6 address'), $ref . '.' . $key));
|
||||
}
|
||||
}
|
||||
if (intval((string)$gateway->current_latencylow) > intval((string)$gateway->current_latencyhigh)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user