Skip to content
Snippets Groups Projects
Commit 81ff24ea authored by Viktor Holovachek's avatar Viktor Holovachek Committed by Viktor Holovachek
Browse files

Issue #3500216 - Add attributes

parent c5c803a9
No related branches found
No related tags found
1 merge request!53Issue #3500216 - Add attributes
Pipeline #405617 passed with warnings
......@@ -3,17 +3,21 @@
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 Numeric validation.
*
* @FapiValidationValidator(
* id = "numeric",
* error_message = "Use only numbers at %field."
* Fapi Validation Plugin for Numeric validation.ror_message = "Use only numbers at %field."
* )
*/
#[FapiValidationValidator(
id: 'numeric',
label: new TranslatableMarkup('Numeric'),
description: new TranslatableMarkup('Finds whether a variable is a number or a numeric string.'),
error_message: 'Use only numbers at %field.',
)]
class NumericValidator 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