base-message.php
2 years ago
is-char-max.php
2 years ago
is-char-min.php
2 years ago
is-date-max.php
2 years ago
is-date-min.php
2 years ago
is-empty-value.php
2 years ago
is-file-ext.php
2 years ago
is-file-size.php
2 years ago
is-files-max.php
2 years ago
is-not-complete-mask.php
2 years ago
is-not-valid-email.php
2 years ago
is-not-valid-url.php
2 years ago
is-number-max.php
2 years ago
is-number-min.php
2 years ago
is-date-max.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace JFB_Modules\Validation\Messages; |
| 5 | |
| 6 | use Jet_Form_Builder\Blocks\Types\Date_Field; |
| 7 | use Jet_Form_Builder\Blocks\Types\Datetime_Field; |
| 8 | use Jet_Form_Builder\Blocks\Types\Time_Field; |
| 9 | |
| 10 | // If this file is called directly, abort. |
| 11 | if ( ! defined( 'WPINC' ) ) { |
| 12 | die; |
| 13 | } |
| 14 | |
| 15 | class Is_Date_Max extends Base_Message { |
| 16 | |
| 17 | public function get_id(): string { |
| 18 | return 'date_max'; |
| 19 | } |
| 20 | |
| 21 | public function supported_blocks(): array { |
| 22 | return array( |
| 23 | Date_Field::class, |
| 24 | Datetime_Field::class, |
| 25 | Time_Field::class, |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | public function get_label(): string { |
| 30 | return __( 'Timestamp is too late', 'jet-form-builder' ); |
| 31 | } |
| 32 | |
| 33 | public function get_initial(): string { |
| 34 | return __( 'Timestamp exceeds the maximum allowed value.', 'jet-form-builder' ); |
| 35 | } |
| 36 | } |
| 37 |