SilverStripe\Core\Validation\FieldValidation
Classes
A field validator for 64-bit integers Will throw a RunTimeException if used on a 32-bit system
Validates that a value is a boolean
A field validator used to validate DBComposite fields
Validates that a value is a valid date, which means that it follows the equivalent formats:
- PHP date format Y-m-d
- ISO format y-MM-dd i.e. DBDate::ISO_DATE
Validates that a value is a valid date/time, which means that it follows the equivalent formats:
- PHP date format Y-m-d H:i:s
- ISO format 'y-MM-dd HH:mm:ss' i.e. DBDateTime::ISO_DATETIME
Validates that a value is a valid decimal This intended for use when validating that a value can be stored in a database as a decimal
Validates that a value is a valid email address Uses Symfony's Email constraint to validate
Trait to add FieldValidator validation to a field, e.g. a DBField or FormField The field must implement FieldValidationInterface
Abstract class that can be used as a FieldValidator for FormFields and DBFields
Validates that a value is a 32-bit signed integer
Validates that a value is a valid IP address Uses Symfony's Ip constraint to validate
Validates that a value is a valid locale Uses Symfony's Locale constraint to validate
Validates that that all values are one of a set of options
Validates that a value is a numeric value Optionally, can also check that the value is within a certain range
Validates that a value is a numeric value and not a string
Validates that a value is one of a set of options
Validates that a value is a string and optionally checks its multi-byte length.
Trait for FieldValidators which validate using Symfony constraints
Validates that a value is a valid time, which means that it follows the equivalent formats:
- PHP date format H:i:s
- ISO format 'HH:mm:ss' i.e. DBTime::ISO_TIME
Validates that a value is a valid URL Uses Symfony's Url constraint to validate
Validates a value in DBYear field This FieldValidator is not intended to be used in fields other than DBYear
Interfaces
Interface for fields e.g. a DBField or FormField, that can use FieldValidator's Intended for use on classes that have the FieldValidationTrait applied
Interface for FieldValidators which validate using Symfony constraints