mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
interfaces: tweak device name validation messages
This commit is contained in:
parent
91d8b7f8bf
commit
6f83fd8eff
@ -53,15 +53,15 @@ class Vlan extends BaseModel
|
||||
break;
|
||||
} elseif (!(strpos((string)$node, (string)$prefix) === 0)) {
|
||||
$messages->appendMessage(new Message(
|
||||
sprintf(gettext("Device name does not match type (e.g. %s0XXX)."), (string)$prefix),
|
||||
sprintf(gettext('The device name prefix "%s" is required.'), (string)$prefix),
|
||||
$key
|
||||
));
|
||||
} elseif (!preg_match("/^{$prefix}0([0-9\.]){1,10}$/", (string)$node)) {
|
||||
$messages->appendMessage(new Message(
|
||||
sprintf(
|
||||
gettext(
|
||||
"A maximum of 15 characters is allowed starting with %s0 combined with " .
|
||||
"numeric characters and dots[.], e.g. (%s.1.104)"
|
||||
'Only a maximum of 15 characters is allowed starting with "%s0" combined with ' .
|
||||
'numeric characters and dots, e.g. "%s0.1.104".'
|
||||
),
|
||||
$prefix,
|
||||
$prefix
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<Required>Y</Required>
|
||||
<Constraints>
|
||||
<check001>
|
||||
<ValidationMessage>Tag should be unique for this interface</ValidationMessage>
|
||||
<ValidationMessage>Tag for this device must be unique.</ValidationMessage>
|
||||
<type>UniqueConstraint</type>
|
||||
<addFields>
|
||||
<field1>if</field1>
|
||||
@ -49,7 +49,7 @@
|
||||
<Required>Y</Required>
|
||||
<Constraints>
|
||||
<check001>
|
||||
<ValidationMessage>The interface name should be unique.</ValidationMessage>
|
||||
<ValidationMessage>The device name must be unique.</ValidationMessage>
|
||||
<type>UniqueConstraint</type>
|
||||
</check001>
|
||||
</Constraints>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user