Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fapi_validation
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
fapi_validation
Merge requests
!50
Issue
#3500205
: Use attributes for AlphaNumericValidator plugin
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3500205
: Use attributes for AlphaNumericValidator plugin
issue/fapi_validation-3500205:3500205-use-attributes-for
into
3.0.x
Overview
1
Commits
1
Pipelines
1
Changes
1
1 unresolved thread
Hide all comments
Merged
oleksandr p.
requested to merge
issue/fapi_validation-3500205:3500205-use-attributes-for
into
3.0.x
3 months ago
Overview
1
Commits
1
Pipelines
1
Changes
1
1 unresolved thread
Hide all comments
Expand
Related to
#3500205
0
0
Merge request reports
Compare
3.0.x
3.0.x (base)
and
latest version
latest version
269540cd
1 commit,
3 months ago
1 file
+
8
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Plugin/FapiValidationValidator/AlphaNumericValidator.php
+
8
−
5
Options
@@ -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 Alpha Numeric validation.
*
* @FapiValidationValidator(
* id = "alpha_numeric",
* error_message = "Use only alpha numerics characters at %field."
* )
*/
#
[
FapiValidationValidator
(
id
:
'alpha_numeric'
,
label
:
new
TranslatableMarkup
(
'Alpha Numeric'
),
description
:
new
TranslatableMarkup
(
'Transform input value to alpha numerics.'
),
I
igor mashevskyi
@IgorMashevskyi
3 months ago
Developer
Wrong description. This plugin validate input value but doesn't transform it
Please
register
or
sign in
to reply
error_message
:
'Use only alpha numerics characters at %field.'
,
)]
class
AlphaNumericValidator
implements
FapiValidationValidatorsInterface
{
/**
Loading
Wrong description. This plugin validate input value but doesn't transform it