| @@ 839-848 (lines=10) @@ | ||
| 836 | return $this; |
|
| 837 | } |
|
| 838 | $this->notEmpty($message, $fieldName); |
|
| 839 | if ( strtotime($this->value) === false ) |
|
| 840 | { |
|
| 841 | $message = $message ?: $this->overrideError; |
|
| 842 | $message = sprintf( |
|
| 843 | $message ?: 'Value "%s" is not a date.', |
|
| 844 | $this->stringify($this->value) |
|
| 845 | ); |
|
| 846 | ||
| 847 | throw $this->createException($message, $this->overrideCode ?: self::INVALID_DATE, $fieldName); |
|
| 848 | } |
|
| 849 | ||
| 850 | return $this; |
|
| 851 | } |
|
| @@ 2627-2636 (lines=10) @@ | ||
| 2624 | { |
|
| 2625 | return $this; |
|
| 2626 | } |
|
| 2627 | if ( null === json_decode($this->value) && JSON_ERROR_NONE !== json_last_error() ) |
|
| 2628 | { |
|
| 2629 | $message = $message ?: $this->overrideError; |
|
| 2630 | $message = sprintf( |
|
| 2631 | $message ?: 'Value "%s" is not a valid JSON string.', |
|
| 2632 | $this->stringify($this->value) |
|
| 2633 | ); |
|
| 2634 | ||
| 2635 | throw $this->createException($message, $this->overrideCode ?: self::INVALID_JSON_STRING, $fieldName); |
|
| 2636 | } |
|
| 2637 | ||
| 2638 | return $this; |
|
| 2639 | } |
|