@@ -20,11 +20,11 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function boot() |
| 22 | 22 | { |
| 23 | - Validator::extend('idcard', function ($attribute, $value, $parameters, $validator) { |
|
| 23 | + Validator::extend('idcard', function($attribute, $value, $parameters, $validator) { |
|
| 24 | 24 | return IdCard::passes($value); |
| 25 | 25 | }); |
| 26 | 26 | |
| 27 | - Validator::replacer('idcard', function ($message, $attribute, $rule, $parameters) { |
|
| 27 | + Validator::replacer('idcard', function($message, $attribute, $rule, $parameters) { |
|
| 28 | 28 | return '无效的身份证号码'; |
| 29 | 29 | }); |
| 30 | 30 | } |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | $day = (int) substr($idcard, 12, 2); |
| 86 | 86 | $year = (int) substr($idcard, 6, 4); |
| 87 | 87 | |
| 88 | - if (! checkdate($month, $day, $year)) { |
|
| 88 | + if (!checkdate($month, $day, $year)) { |
|
| 89 | 89 | return false; |
| 90 | 90 | } |
| 91 | 91 | |