Skip to content

Commit

Permalink
Add more email validation cases to the testBasic method.
Browse files Browse the repository at this point in the history
  • Loading branch information
alikhosravidev committed Mar 4, 2025
1 parent 9b9f91e commit a27ad10
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/Validation/ValidationEmailRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ public function testBasic()
['The '.self::ATTRIBUTE_REPLACED.' must be a valid email address.']
);

$this->fails(
Email::default(),
12345,
[Email::class]
);

$this->fails(
Rule::email(),
12345,
[Email::class]
);

$this->passes(
Email::default(),
'[email protected]'
Expand All @@ -43,6 +55,16 @@ public function testBasic()
'[email protected]'
);

$this->passes(
Rule::email(),
['[email protected]'],
);

$this->passes(
Email::default(),
['[email protected]'],
);

$this->passes(Email::default(), null);

$this->passes(Rule::email(), null);
Expand Down

0 comments on commit a27ad10

Please sign in to comment.