Skip to content

Commit

Permalink
Update ServiceProvider.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre committed Jun 3, 2016
1 parent 1ae3eae commit b2b7239
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ServiceProvider.php
Expand Up @@ -19,12 +19,11 @@ public function boot()

\Validator::extend('ccd', function($attribute, $value, $parameters, $validator) {
try {

$value = explode('/', $value);
return CreditCard::validDate($value[0], $value[1]);
} catch(\Exception $e) {
return false;
}
$value = explode('/', $value);
return CreditCard::validDate($value[0], $value[1]);
});

\Validator::extend('cvc', function($attribute, $value, $parameters, $validator) {
Expand Down

0 comments on commit b2b7239

Please sign in to comment.