Skip to content
Snippets Groups Projects

Issue #3500208

Merged lysenko requested to merge issue/fapi_validation-3500208:3500208-use-attributes-for into 3.0.x
1 file
+ 8
5
Compare changes
  • Side-by-side
  • Inline
@@ -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 Decimal validation.
*
* @FapiValidationValidator(
* id = "decimal",
* error_message = "Use only decimal on %field."
* )
*/
#[FapiValidationValidator(
id: 'decimal',
label: new TranslatableMarkup('Decimal'),
description: new TranslatableMarkup('Validate input by the given pattern.'),
error_message: 'Use only decimal on %field.',
)]
class DecimalValidator implements FapiValidationValidatorsInterface {
/**
Loading