Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with 1.x branch additions #714

Merged
merged 11 commits into from
Jun 7, 2024
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