Skip to content

Commit

Permalink
Sync with 1.x branch additions (#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Jun 7, 2024
1 parent da04738 commit 9b597da
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 219 deletions.
2 changes: 1 addition & 1 deletion docs/guide/en/result.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,4 @@ $result->getAttributeErrors('email');
```

[Using keys containing separator / shortcut]: built-in-rules-nested.md#using-keys-containing-separator--shortcut
[will cast keys to the int type]: https://www.php.net/manual/en/language.oop5.properties.php#language.oop5.properties.readonly-properties
[will cast keys to the int type]: https://www.php.net/manual/en/language.types.array.php
1 change: 1 addition & 0 deletions src/Exception/UnexpectedRuleException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* use Yiisoft\Validator\Exception\UnexpectedRuleException;
* use Yiisoft\Validator\Result;
* use Yiisoft\Validator\RuleHandlerInterface;
* use Yiisoft\Validator\RuleInterface;
* use Yiisoft\Validator\ValidationContext;
*
* final class MyRuleHandler implements RuleHandlerInterface
Expand Down
160 changes: 0 additions & 160 deletions src/Rule/DateTime.php

This file was deleted.

57 changes: 0 additions & 57 deletions src/Rule/DateTimeHandler.php

This file was deleted.

1 change: 1 addition & 0 deletions src/Rule/NestedHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Yiisoft\Validator\RuleInterface;
use Yiisoft\Validator\ValidationContext;

use function array_slice;
use function is_array;
use function is_int;
use function is_object;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rule/AtLeastTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function dataValidationFailed(): array
['data' => new AtLeast(['attr1', 'attr2'], min: 2, message: 'Attributes - {attributes}, min - {min}.')],
['data' => ['Attributes - "attr1", "attr2", min - 2.']],
],
'class attribute, tranlation' => [
'class attribute, translation' => [
new AtLeastDto(),
null,
['' => ['At least 1 attribute from this list must be filled: "A", "B", "C".']],
Expand Down

0 comments on commit 9b597da

Please sign in to comment.