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
Commits
0876fd3a
Commit
0876fd3a
authored
3 weeks ago
by
Viktor Holovachek
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3500868
- Update readme
parent
6eed4b9a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Pipeline
#405775
passed with warnings
3 weeks ago
Stage: build
Stage: validate
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.cspell.json
+1
-0
1 addition, 0 deletions
.cspell.json
README.md
+28
-8
28 additions, 8 deletions
README.md
with
29 additions
and
8 deletions
.cspell.json
+
1
−
0
View file @
0876fd3a
...
...
@@ -10,6 +10,7 @@
"Viktor"
,
"barraponto"
,
"jnicola"
,
"mashevskyi"
,
"myfield"
,
"mymodule"
,
"otherfield"
,
...
...
This diff is collapsed.
Click to expand it.
README.md
+
28
−
8
View file @
0876fd3a
...
...
@@ -26,6 +26,12 @@ information, see
[
Installing Drupal Modules
](
https://www.drupal.org/docs/extending-drupal/installing-drupal-modules
)
.
## Bypass validations
It's possible to bypass any validations by enabling the required configuration and configuring user permissions.
All Form API validation settings can be found on the
`/admin/config/system/fapi`
page.
## Available Validators
|Rule|Usage|Description|
...
...
@@ -45,16 +51,29 @@ information, see
|match_field|
`match_field[otherfield]`
|Check if the field has same value of otherfield.|
|range|
`range[<min>, <max>]`
|Check if the field value is in defined range.|
It's possible to add custom validations as plugins.
All of validations can be found on the
`/admin/config/system/fapi/validations`
page.
## Available Filters
|Filter|Description|
|------|-----------|
|
`numeric`
|Remove all non numeric characters.|
|
`trim`
|Remove all spaces before and after value.|
|
`uppercase`
|Transform all characters to upper case.|
|
`lowercase`
|Transform all characters to lower case.|
|
`strip_tags`
|Strips out ALL html tags.|
|
`html_entities`
|Decodes all previously encoded entities, and then encodes all entities.|
|Filter| Description |
|------|-------------------------------------------------------------------------|
|
`numeric`
| Remove all non numeric characters. |
|
`trim`
| Remove all spaces before and after value. |
|
`ltrim`
| Remove all spaces before value. |
|
`rtrim`
| Remove all spaces after value. |
|
`machine_name`
| Transform input values into machine-readable names. |
|
`ucfirst`
| Make a string's first character uppercase. |
|
`ucwords`
| Uppercase the first character of each word in a string. |
|
`uppercase`
| Transform all characters to upper case. |
|
`lowercase`
| Transform all characters to lower case. |
|
`strip_tags`
| Strips out ALL html tags. |
|
`html_entities`
| Decodes all previously encoded entities, and then encodes all entities. |
It's possible to add custom filters as plugins.
All of filters can be found on the
`/admin/config/system/fapi/filters`
page.
## Usage
...
...
@@ -239,3 +258,4 @@ Now you are able to use at your form definition.
-
Capi Etheriel -
[
barraponto
](
https://www.drupal.org/u/barraponto
)
-
Jesse -
[
jnicola
](
https://www.drupal.org/u/jnicola
)
-
Viktor Holovachek -
[
AstonVictor
](
https://www.drupal.org/u/astonvictor
)
-
igor mashevskyi -
[
igor-mashevskyi
](
https://www.drupal.org/u/igor-mashevskyi
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment