commit
c54fe77a51
|
|
@ -2,6 +2,7 @@ language: php
|
|||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
|
||||
before_script:
|
||||
- travis_retry composer self-update
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php" : ">=5.6.0",
|
||||
"illuminate/support": "~5.3.28|~5.4",
|
||||
"bjeavons/zxcvbn-php": "^0.3"
|
||||
"php" : ">=5.6.0|>=7.0",
|
||||
"illuminate/support": "~5.3.28|~5.4|~5.5",
|
||||
"bjeavons/zxcvbn-php": "0.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit" : "5.7.*",
|
||||
"orchestra/testbench": "~3.4"
|
||||
"phpunit/phpunit" : "5.7.*|~6.0",
|
||||
"orchestra/testbench": "~3.3|~3.4|~3.5"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
@ -43,7 +43,12 @@
|
|||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
"dev-master": "3.x-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Olssonm\\Zxcvbn\\ZxcvbnServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"minimum-stability": "stable"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue