Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public static function validate($birthdate) |
||
15 | { |
||
16 | if (!parent::validate($birthdate)) { |
||
17 | return false; |
||
18 | } |
||
19 | |||
20 | $birthdate = Carbon::createFromFormat('Y-m-d', self::toDatabase($birthdate)); |
||
21 | if ($birthdate->greaterThan(Carbon::now())) { |
||
22 | return false; |
||
23 | } |
||
24 | |||
25 | return true; |
||
26 | } |
||
34 |