Skip to content

Commit

Permalink
Revert "Merge pull request laravel#16692 from rohitsubedi/rohitsubedi…
Browse files Browse the repository at this point in the history
…-patch-1"

This reverts commit 4c70ab0, reversing
changes made to e91f04b.
  • Loading branch information
mfn committed Dec 17, 2016
1 parent 08ffe4e commit 9a2117a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Validation/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1841,9 +1841,9 @@ protected function validateDateFormat($attribute, $value, $parameters)
return false;
}

$date = DateTime::createFromFormat($parameters[0], $value);
$parsed = date_parse_from_format($parameters[0], $value);

return $date && $date->format($parameters[0]) === $value;
return $parsed['error_count'] === 0 && $parsed['warning_count'] === 0;
}

/**
Expand Down

0 comments on commit 9a2117a

Please sign in to comment.