Skip to content

Commit 82af7cb

Browse files
Merge pull request #1 from Shaun2D2/error-message
moved default error message
2 parents 169bd26 + 31166c8 commit 82af7cb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/DumbPasswordServiceProvider.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ class DumbPasswordServiceProvider extends ServiceProvider
2424
*/
2525
protected $defer = false;
2626

27+
/**
28+
* default error message
29+
*
30+
* @var string
31+
*/
32+
protected $message = 'This password is just too common. Please try another!';
33+
2734
/**
2835
* Publishes all the config file this package needs to function
2936
*/
@@ -35,7 +42,7 @@ public function boot()
3542

3643
Validator::extend('dumbpwd', function($attribute, $value, $parameters, $validator) use ($data) {
3744
return !$data->has($value);
38-
}, 'This password is just too common. Please try another!');
45+
}, $message);
3946
}
4047

4148
/**

0 commit comments

Comments
 (0)