| 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_Min extends Base_Message { |
| 16 |
|
| 17 |
public function get_id(): string { |
| 18 |
return 'date_min'; |
| 19 |
} |
| 20 |
|
| 21 |
public function get_label(): string { |
| 22 |
return __( 'Timestamp is too early', 'jet-form-builder' ); |
| 23 |
} |
| 24 |
|
| 25 |
public function supported_blocks(): array { |
| 26 |
return array( |
| 27 |
Date_Field::class, |
| 28 |
Datetime_Field::class, |
| 29 |
Time_Field::class, |
| 30 |
); |
| 31 |
} |
| 32 |
|
| 33 |
public function get_initial(): string { |
| 34 |
return __( 'Timestamp is below the minimum allowed value.', 'jet-form-builder' ); |
| 35 |
} |
| 36 |
} |
| 37 |
|