Skip to content

Commit 0b1610f

Browse files
committed
fix callable password defaults
1 parent 019277c commit 0b1610f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Illuminate/Validation/Rules/Password.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ public static function defaults($callback = null)
132132
*/
133133
public static function default()
134134
{
135-
$password = value(static::$defaultCallback);
135+
$password = is_callable(static::$defaultCallback)
136+
? call_user_func(static::$defaultCallback)
137+
: static::$defaultCallback;
136138

137139
return $password instanceof Rule ? $password : static::min(8);
138140
}

0 commit comments

Comments
 (0)