From 31166c861739a745774c101d8242fa9b5a0af32b Mon Sep 17 00:00:00 2001 From: Shaun Lobisnger Date: Tue, 5 Jul 2016 21:19:40 -0700 Subject: [PATCH] moved default error message to a protected variable to make it more explicit --- src/DumbPasswordServiceProvider.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/DumbPasswordServiceProvider.php b/src/DumbPasswordServiceProvider.php index 7d8a4ee..c0d8c6a 100644 --- a/src/DumbPasswordServiceProvider.php +++ b/src/DumbPasswordServiceProvider.php @@ -24,6 +24,13 @@ class DumbPasswordServiceProvider extends ServiceProvider */ protected $defer = false; + /** + * default error message + * + * @var string + */ + protected $message = 'This password is just too common. Please try another!'; + /** * Publishes all the config file this package needs to function */ @@ -35,7 +42,7 @@ public function boot() Validator::extend('dumbpwd', function($attribute, $value, $parameters, $validator) use ($data) { return !$data->has($value); - }, 'This password is just too common. Please try another!'); + }, $message); } /**