class StateConstraint in State Machine 8
Ensures the validity of the specified state.
The state must exist on the used workflow, and be in the allowed transitions.
Plugin annotation
@Constraint(
id = "State",
label = @Translation("State", context = "Validation")
)
Hierarchy
- class \Drupal\state_machine\Plugin\Validation\Constraint\StateConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of StateConstraint
File
- src/
Plugin/ Validation/ Constraint/ StateConstraint.php, line 17
Namespace
Drupal\state_machine\Plugin\Validation\ConstraintView source
class StateConstraint extends Constraint {
/**
* The default violation message.
*
* @var string
*/
public $message = "The state '@state' is invalid.";
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
StateConstraint:: |
public | property | The default violation message. |