base-message.php
3 years ago
is-char-max.php
3 years ago
is-char-min.php
3 years ago
is-date-max.php
3 years ago
is-date-min.php
3 years ago
is-empty-value.php
3 years ago
is-file-ext.php
3 years ago
is-file-size.php
3 years ago
is-files-max.php
3 years ago
is-not-complete-mask.php
3 years ago
is-not-valid-email.php
3 years ago
is-not-valid-url.php
3 years ago
is-number-max.php
3 years ago
is-number-min.php
3 years ago
is-number-max.php
35 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Blocks\Validation_Messages; |
| 5 | |
| 6 | |
| 7 | use Jet_Form_Builder\Blocks\Types\Number_Field; |
| 8 | use Jet_Form_Builder\Blocks\Types\Range_Field; |
| 9 | |
| 10 | class Is_Number_Max extends Base_Message { |
| 11 | |
| 12 | public function get_id(): string { |
| 13 | return 'number_max'; |
| 14 | } |
| 15 | |
| 16 | public function get_label(): string { |
| 17 | return __( 'Value exceeds the maximum', 'jet-form-builder' ); |
| 18 | } |
| 19 | |
| 20 | public function supported_blocks(): array { |
| 21 | return array( |
| 22 | Number_Field::class, |
| 23 | Range_Field::class, |
| 24 | ); |
| 25 | } |
| 26 | |
| 27 | public function get_initial(): string { |
| 28 | return __( |
| 29 | 'Please enter a number not greater than %this(max)%. Current value %this|ifEmpty(is empty)%.', |
| 30 | 'jet-form-builder' |
| 31 | ); |
| 32 | } |
| 33 | |
| 34 | |
| 35 | } |