-
-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4.x] Allow overwriting the column for
unique_user_value
validation (…
…#8852) Co-authored-by: Jason Varga <[email protected]>
- Loading branch information
1 parent
323fa4e
commit eb1a1fc
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,15 @@ public function it_passes_when_updating() | |
['email' => 'unique_user_value:123'] | ||
)->passes()); | ||
} | ||
|
||
/** @test */ | ||
public function it_supports_overwriting_the_column() | ||
{ | ||
User::make()->email('[email protected]')->save(); | ||
|
||
$this->assertTrue(Validator::make( | ||
['baz' => '[email protected]'], | ||
['baz' => 'unique_user_value:null,email'] | ||
)->fails()); | ||
} | ||
} |