Skip to content

Commit

Permalink
Rename phone validation macro to phoneRegex for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnabil230 committed Jan 21, 2025
1 parent b5d7760 commit a66c212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Validation/ValidationMacroTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ class ValidationMacroTest extends TestCase
public function testMacroable()
{
// Define a phone validation macro
Rule::macro('phone', function () {
Rule::macro('phoneRegex', function () {
return 'regex:/^([0-9\s\-\+\(\)]*)$/';
});

$actualRule = Rule::phone();
$actualRule = Rule::phoneRegex();
$this->assertSame('regex:/^([0-9\s\-\+\(\)]*)$/', $actualRule);
}

Expand Down

0 comments on commit a66c212

Please sign in to comment.