Skip to content
Snippets Groups Projects
Commit bd27107f authored by Oleksandr Pozharskyi's avatar Oleksandr Pozharskyi
Browse files

Issue #3500213: Use attributes for LimitDecimalsValidator plugin

parent a90dfc04
No related branches found
No related tags found
1 merge request!58Issue #3500213: Use attributes for LimitDecimalsValidator plugin
Pipeline #405661 passed with warnings
......@@ -3,17 +3,20 @@
namespace Drupal\fapi_validation\Plugin\FapiValidationValidator;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\fapi_validation\Attribute\FapiValidationValidator;
use Drupal\fapi_validation\FapiValidationValidatorsInterface;
use Drupal\fapi_validation\Validator;
/**
* Fapi Validation Plugin for Limit Decimals.
*
* @FapiValidationValidator(
* id = "limit_decimals",
* error_message = "Invalid value for %field or too many decimal digits."
* )
*/
#[FapiValidationValidator(
id: 'limit_decimals',
label: new TranslatableMarkup('Limit Decimals'),
description: new TranslatableMarkup('Validates input value on the limit decimals digits.'),
error_message: 'Invalid value for %field or too many decimal digits.',
)]
class LimitDecimalsValidator implements FapiValidationValidatorsInterface {
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment