From 80b649ea342656076b0305451d8c7740cf690561 Mon Sep 17 00:00:00 2001 From: Marcus Olsson Date: Thu, 9 Nov 2017 15:55:49 +0100 Subject: [PATCH] Bugfix for input/attribute message in Laravel 5.5. --- src/ZxcvbnServiceProvider.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ZxcvbnServiceProvider.php b/src/ZxcvbnServiceProvider.php index 00940e9..7c69825 100644 --- a/src/ZxcvbnServiceProvider.php +++ b/src/ZxcvbnServiceProvider.php @@ -28,10 +28,10 @@ class ZxcvbnServiceProvider extends ServiceProvider } return ($zxcvbn['score'] >= $target); - }, 'Your :input is not secure enough.'); + }, 'Your :attribute is not secure enough.'); Validator::replacer('zxcvbn_min', function($message, $attribute, $rule, $parameters) { - $message = str_replace(':input', $attribute, $message); + $message = str_replace(':attribute', $attribute, $message); return $message; }); @@ -59,10 +59,10 @@ class ZxcvbnServiceProvider extends ServiceProvider return true; - }, 'Your :input is insecure. It either matches a commonly used password, or you have used a similar username/password combination.'); + }, 'Your :attribute is insecure. It either matches a commonly used password, or you have used a similar username/password combination.'); Validator::replacer('zxcvbn_dictionary', function($message, $attribute, $rule, $parameters) { - $message = str_replace(':input', $attribute, $message); + $message = str_replace(':attribute', $attribute, $message); return $message; }); }