Commit 12b8a13b authored by Ad Schellevis's avatar Ad Schellevis

(model) remove namespace from Constraints type

parent c85f821c
......@@ -372,7 +372,7 @@ abstract class BaseField
$constraint = $this->internalConstraints[$name];
if (!empty($constraint['type'])) {
try {
$constr_class = new \ReflectionClass($constraint['type']);
$constr_class = new \ReflectionClass('OPNsense\\Base\\Constraints\\'.$constraint['type']);
if ($constr_class->getParentClass()->name == 'OPNsense\Base\Constraints\BaseConstraint') {
$constraint['name'] = $name;
$constraint['node'] = $this;
......
......@@ -155,7 +155,7 @@
<Constraints>
<check001>
<ValidationMessage>Both throttling parameters should either be filled or empty</ValidationMessage>
<type>OPNsense\Base\Constraints\AllOrNoneConstraint</type>
<type>AllOrNoneConstraint</type>
<addFields>
<field1>perHostTrotteling</field1>
</addFields>
......@@ -307,7 +307,7 @@
<Constraints>
<check001>
<ValidationMessage>Filename should be unique</ValidationMessage>
<type>OPNsense\Base\Constraints\UniqueConstraint</type>
<type>UniqueConstraint</type>
</check001>
</Constraints>
</filename>
......
......@@ -23,7 +23,7 @@
<Constraints>
<check001>
<ValidationMessage>number should be unique</ValidationMessage>
<type>OPNsense\Base\Constraints\UniqueConstraint</type>
<type>UniqueConstraint</type>
<addFields>
<field1>optfield</field1>
</addFields>
......@@ -39,7 +39,7 @@
<Constraints>
<check001>
<ValidationMessage>All fields should contain data or none of them</ValidationMessage>
<type>OPNsense\Base\Constraints\AllOrNoneConstraint</type>
<type>AllOrNoneConstraint</type>
<addFields>
<field2>value2</field2>
<field3>value3</field3>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment