Problem/Motivation

Symfony validator is added to Drupal core, and it contains many constraints.

Supported Constraints of symfony
Symfony packages many of the most commonly-needed constraints:

Basic Constraints

These are the basic constraints: use them to assert very basic things about the value of properties or the return value of methods on your object.

NotBlank
Blank
NotNull
IsNull
IsTrue
IsFalse
Type

String Constraints

Email
ExpressionSyntax
Length
Url
Regex
Hostname
Ip
Cidr
Json
Uuid
Ulid
UserPassword
NotCompromisedPassword
PasswordStrength
CssColor
NoSuspiciousCharacters

Comparison Constraints

EqualTo
NotEqualTo
IdenticalTo
NotIdenticalTo
LessThan
LessThanOrEqual
GreaterThan
GreaterThanOrEqual
Range
DivisibleBy
Unique

Number Constraints

Positive
PositiveOrZero
Negative
NegativeOrZero

Date Constraints

Date
DateTime
Time
Timezone

Choice Constraints

Choice
Language
Locale
Country

File Constraints

File
Image

Financial and other Number Constraints

Bic
CardScheme
Currency
Luhn
Iban
Isbn
Issn
Isin

Other Constraints

AtLeastOneOf
Sequentially
Compound
Callback
Expression
When
All
Valid
Cascade
Traverse
Collection
Count
UniqueEntity
EnableAutoMapping
DisableAutoMapping

Constraint which in Bold format is to be supported.

Comments

g089h515r806 created an issue. See original summary.

g089h515r806’s picture

Some of already supported in previous version alpha1.

g089h515r806’s picture

Issue summary: View changes
g089h515r806’s picture

g089h515r806’s picture

Issue summary: View changes
g089h515r806’s picture

Issue summary: View changes
g089h515r806’s picture

Status: Active » Fixed

mark this as fixed.
A lot symfony supported. some of them useless in Drupal, some too complex to use.

we can add them later if needed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.