Skip to content

Commit

Permalink
Added the referential uuid to the validator.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanbaidan committed Sep 23, 2024
1 parent ab66244 commit 385d042
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Monarc\Core\Validator\InputValidator\Referential;

use Laminas\Validator\StringLength;
use Monarc\Core\Validator\InputValidator\AbstractInputValidator;

class PostReferentialDataInputValidator extends AbstractInputValidator
Expand All @@ -18,6 +19,21 @@ protected function getRules(): array
$labelRules[] = $this->getLabelRule($systemLanguageIndex);
}

return $labelRules;
return array_merge([
[
'name' => 'uuid',
'required' => false,
'filters' => [],
'validators' => [
[
'name' => StringLength::class,
'options' => [
'min' => 36,
'max' => 36,
]
],
],
],
], $labelRules);
}
}

0 comments on commit 385d042

Please sign in to comment.