ErrorAbstract.php
1 week ago
InvalidEmailError.php
1 week ago
InvalidRegexError.php
1 week ago
InvalidUrlError.php
1 week ago
InvalidValueError.php
1 week ago
NumberMaxError.php
1 week ago
NumberMinError.php
1 week ago
NumberStepError.php
1 week ago
ValidatorError.php
1 week ago
NumberMaxError.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPDesk\FCF\Free\Validator\Error; |
| 4 | |
| 5 | use WPDesk\FCF\Free\Settings\Option\ValueMaxOption; |
| 6 | |
| 7 | /** |
| 8 | * {@inheritdoc} |
| 9 | */ |
| 10 | class NumberMaxError extends ErrorAbstract { |
| 11 | |
| 12 | /** |
| 13 | * {@inheritdoc} |
| 14 | */ |
| 15 | public function get_error_message(): string { |
| 16 | return sprintf( |
| 17 | /* translators: %1$s: field label, %2$s: minimum value */ |
| 18 | __( 'The maximum value for the %1$s field is %2$s.', 'flexible-checkout-fields' ), |
| 19 | sprintf( '<strong>%s</strong>', strip_tags( $this->field_data['label'] ) ), |
| 20 | esc_html( $this->field_data[ ValueMaxOption::FIELD_NAME ] ) |
| 21 | ); |
| 22 | } |
| 23 | } |
| 24 |