class GranularityStringConstraint in Duration Field 8.2
Same name and namespace in other branches
- 3.0.x src/Plugin/Validation/Constraint/GranularityStringConstraint.php \Drupal\duration_field\Plugin\Validation\Constraint\GranularityStringConstraint
Checks that the submitted value is a valid granularity string.
Plugin annotation
@Constraint(
id = "granularity_string",
label = @Translation("Granularity String", context = "Validation"),
type = "string"
)
Hierarchy
- class \Drupal\duration_field\Plugin\Validation\Constraint\GranularityStringConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of GranularityStringConstraint
File
- src/
Plugin/ Validation/ Constraint/ GranularityStringConstraint.php, line 16
Namespace
Drupal\duration_field\Plugin\Validation\ConstraintView source
class GranularityStringConstraint extends Constraint {
/**
* The message shown when the value is not a valid granularity string.
*
* @var string
*/
public $notValidGranularityString = '%value is not a valid granularity string';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GranularityStringConstraint:: |
public | property | The message shown when the value is not a valid granularity string. |