You are here

class GranularityStringConstraint in Duration Field 3.0.x

Same name and namespace in other branches
  1. 8.2 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

Expanded class hierarchy of GranularityStringConstraint

File

src/Plugin/Validation/Constraint/GranularityStringConstraint.php, line 16

Namespace

Drupal\duration_field\Plugin\Validation\Constraint
View 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

Namesort descending Modifiers Type Description Overrides
GranularityStringConstraint::$notValidGranularityString public property The message shown when the value is not a valid granularity string.