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

Issue #3500210 - Add atrributes

parent 20e99883
No related branches found
No related tags found
1 merge request!48Issue #3500210 - Add atrributes
Pipeline #405573 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 Email validation.
*
* @FapiValidationValidator(
* id = "email",
* error_message = "%field is not a valid email."
* )
*/
#[FapiValidationValidator(
id: 'email',
label: new TranslatableMarkup('Email'),
description: new TranslatableMarkup('Validates an email address.'),
error_message: '%field is not a valid email.',
)]
class EmailValidator 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