Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/system/Validation/RulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -823,8 +823,8 @@ public static function provideRequiredWithAndOtherRules(): iterable
[true, ['mustBeADate' => []]],
// `otherField` and `mustBeADate` exist
[true, ['mustBeADate' => '', 'otherField' => '']],
[true, ['mustBeADate' => '2023-06-12', 'otherField' => 'exists']],
[true, ['mustBeADate' => '2023-06-12', 'otherField' => '']],
[true, ['mustBeADate' => '2023-06-12', 'otherField' => 'exists']],
[true, ['mustBeADate' => '2023-06-12', 'otherField' => '']],
[false, ['mustBeADate' => '', 'otherField' => 'exists']],
[false, ['mustBeADate' => [], 'otherField' => 'exists']],
[false, ['mustBeADate' => null, 'otherField' => 'exists']],
Expand Down Expand Up @@ -854,7 +854,7 @@ public static function provideRequiredWithAndOtherRuleWithValueZero(): iterable
{
yield from [
[true, ['married' => '0', 'partner_name' => '']],
[true, ['married' => '1', 'partner_name' => 'Foo']],
[true, ['married' => '1', 'partner_name' => 'Foo']],
[false, ['married' => '1', 'partner_name' => '']],
];
}
Expand Down
8 changes: 4 additions & 4 deletions tests/system/Validation/ValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,13 +605,13 @@ public function testSetRuleWithCustomErrors(): void
$this->validation->setRule(
'foo',
'Foo',
['foo' => 'is_numeric'],
['foo' => 'is_numeric'],
['is_numeric' => 'Nope. Not a number.'],
);
$this->validation->setRule(
'bar',
'Bar',
['bar' => 'is_numeric'],
['bar' => 'is_numeric'],
['is_numeric' => 'Nope. Not a number.'],
);
$result = $this->validation->run($data);
Expand Down Expand Up @@ -1497,13 +1497,13 @@ public static function provideIfExistRuleWithAsterisk(): iterable
yield 'dot-on-end-fail' => [
false,
['status.*' => 'if_exist|in_list[status_1,status_2]'],
['status' => ['bad-status']],
['status' => ['bad-status']],
];

yield 'dot-on-end-pass' => [
true,
['status.*' => 'if_exist|in_list[status_1,status_2]'],
['status' => ['status_1']],
['status' => ['status_1']],
];

yield 'dot-on-middle-fail' => [
Expand Down
Loading