Skip to content
Snippets Groups Projects

Issue #3500214: Use attributes for MatchFieldValidator plugin

1 file
+ 8
5
Compare changes
  • Side-by-side
  • Inline
@@ -3,17 +3,20 @@
@@ -3,17 +3,20 @@
namespace Drupal\fapi_validation\Plugin\FapiValidationValidator;
namespace Drupal\fapi_validation\Plugin\FapiValidationValidator;
use Drupal\Core\Form\FormStateInterface;
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\FapiValidationValidatorsInterface;
use Drupal\fapi_validation\Validator;
use Drupal\fapi_validation\Validator;
/**
/**
* Fapi Validation Plugin for Match Field validation.
* 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 {
class MatchFieldValidator implements FapiValidationValidatorsInterface {
/**
/**
Loading