Range constraint.
Overrides the symfony constraint to use Drupal-style replacement patterns.
@todo: Move this below the TypedData core component.
@Plugin(
id = "Range",
label = @Translation("Range", context = "Validation"),
type = { "integer", "float" }
)
Expanded class hierarchy of RangeConstraint
class RangeConstraint extends Range {
public $minMessage = 'This value should be %limit or more.';
public $maxMessage = 'This value should be %limit or less.';
/**
* Overrides Range::validatedBy().
*/
public function validatedBy() {
return '\\Symfony\\Component\\Validator\\Constraints\\RangeValidator';
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Constraint:: |
public | property | ||
Constraint:: |
public | function | Adds the given group if this constraint is in the Default group | |
Constraint:: |
constant | Marks a constraint that can be put onto classes | ||
Constraint:: |
constant | The name of the group given to all constraints with no explicit group | ||
Constraint:: |
public | function | Returns the name of the default option | 12 |
Constraint:: |
public | function | Returns the name of the required options | 10 |
Constraint:: |
public | function | Returns whether the constraint can be put onto classes, properties or both | 7 |
Constraint:: |
constant | Marks a constraint that can be put onto properties | ||
Constraint:: |
public | function | Unsupported operation. | |
Range:: |
public | property | ||
Range:: |
public | property | ||
Range:: |
public | property | ||
Range:: |
public | function |
Initializes the constraint with options. Overrides Constraint:: |
|
RangeConstraint:: |
public | property |
Overrides Range:: |
|
RangeConstraint:: |
public | property |
Overrides Range:: |
|
RangeConstraint:: |
public | function |
Overrides Range::validatedBy(). Overrides Constraint:: |