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

Issue #3500214: Use attributes for MatchFieldValidator plugin

parent 17617546
No related branches found
No related tags found
1 merge request!64Issue #3500214: Use attributes for MatchFieldValidator plugin
Pipeline #405695 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 Match Field validation.
*
* @FapiValidationValidator(
* id = "match_field",
* error_message = "%field value does not match other field."
* )
*/
#[FapiValidationValidator(
id: 'match_field',
label: new TranslatableMarkup('Match Field'),
description: new TranslatableMarkup('Validates input value for matched value.'),
error_message: '%field value does not match other field.',
)]
class MatchFieldValidator 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