Skip to content

Commit a533db8

Browse files
authored
Merge pull request #1 from tobytwigger/fix-validation-issue
Fix validator issue
2 parents dcb7938 + b02993f commit a533db8

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

.github/workflows/build-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build_php:
99
strategy:
1010
matrix:
11-
php: [ '8.0', '8.1' ]
11+
php: [ '8.1', '8.2' ]
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
],
4040
"require": {
4141
"laravel/framework": "^8.0|^9.0|^10.0",
42-
"php": "^8.0",
42+
"php": "^8.1",
4343
"tobytwigger/form-schema-generator": "^3.0"
4444
},
4545
"require-dev": {

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)