Skip to content

Commit

Permalink
Add yiisoft/validator of version ^2.0 support (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored Aug 6, 2024
1 parent 3125fcd commit 6a8c2d0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## 1.0.1 under development

- no changes in this release.
- Enh #47: Add `yiisoft/validator` of version `^2.0` support (@vjik)

## 1.0.0 March 07, 2024

- Initial release.
- Initial release.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"yiisoft/hydrator": "^1.0",
"yiisoft/hydrator-validator": "^2.0",
"yiisoft/middleware-dispatcher": "^5.1",
"yiisoft/validator": "^1.1",
"yiisoft/validator": "^1.1|^2.0",
"yiisoft/request-provider": "^1.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion tests/RequestInputParametersResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testBase(): void
$this->assertInstanceOf(PersonInput::class, $person);
$this->assertFalse($person->getValidationResult()->isValid());
$this->assertSame(
['name' => ['Value cannot be blank.']],
['name' => ['Name is required.']],
$person->getValidationResult()->getErrorMessagesIndexedByPath()
);

Expand Down
2 changes: 1 addition & 1 deletion tests/Support/Input/PersonInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
final class PersonInput extends AbstractInput
{
public function __construct(
#[Required]
#[Required(message: 'Name is required.')]
public string $name = '',
) {
}
Expand Down

0 comments on commit 6a8c2d0

Please sign in to comment.