Skip to content

Commit 3c1db89

Browse files
committed
simplify default error result
1 parent cb132fa commit 3c1db89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Type/ErrorType/ValidationErrorType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public static function create(array $config, array $path = []): self
141141
*/
142142
public function validate(array $field, $value, array $settings): array
143143
{
144-
return [0];
144+
return [];
145145
}
146146

147147
/**

tests/Validation/ValidationErrorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function testNullableScalarValidationOnNullValueSuccess(): void
1515
$validationError = TypeRegistry::validationError();
1616
$res = $validationError->validate(['type' => Type::id()], null, ['type' => Type::id(), 'args' => []]);
1717

18-
static::assertEquals($res[0], 0);
18+
static::assertEquals($res, []);
1919

2020
}
2121
}

0 commit comments

Comments
 (0)