We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0809b1 commit 368a006Copy full SHA for 368a006
tests/Fixtures/UppercaseRule.php
@@ -15,10 +15,15 @@ class UppercaseRule implements ValidationRule
15
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
16
* @return void
17
*/
18
- public function validate(string $attribute, mixed $value, Closure $fail): void
+ public function validate(string $attribute, mixed $value, Closure $fail): void
19
{
20
if (strtoupper($value) !== $value) {
21
$fail("The {$attribute} must be uppercase.");
22
}
23
24
+
25
+ public function __toString(): string
26
+ {
27
+ return 'uppercase';
28
+ }
29
0 commit comments