Skip to content

Commit 48b8acf

Browse files
Fix validator
1 parent dcb7938 commit 48b8acf

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Decorators/ValidationDecorator.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ public function setValue(string $key, mixed $value, ?int $id = null): void
3737
private function validateValue(string $key, mixed $value)
3838
{
3939
$setting = $this->settingStore->getByKey($key);
40-
$validator = Validator::make(
41-
['setting' => $value],
42-
['setting' => $setting->rules()]
43-
);
40+
$validator = $setting->validator($value);
4441
$validator->validate();
4542
}
4643

0 commit comments

Comments
 (0)