Skip to content
Snippets Groups Projects
Commit 2b9bab69 authored by oleksandr p.'s avatar oleksandr p. Committed by Viktor Holovachek
Browse files

Resolve #3500211 "Use attributes for"

parent 0dd0f94a
No related branches found
No related tags found
1 merge request!56Resolve #3500211 "Use attributes for"
Pipeline #405653 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 IPV4 validation.
*
* @FapiValidationValidator(
* id = "ipv4",
* error_message = "Invalid format of %field."
* )
*/
#[FapiValidationValidator(
id: 'ipv4',
label: new TranslatableMarkup('IPV4'),
description: new TranslatableMarkup('Validates input value on correct ipv4 pattern.'),
error_message: 'Invalid format of %field.',
)]
class Ipv4Validator 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