generate:plugin:validationconstraint
Generate a validation constraint plugin.
Utilização:
drupal generate:plugin:validationconstraint [options]
gpvc
Opções disponíveis
Opção | Detalhes |
---|---|
--module | O nome do módulo. |
--class | Plugin class name |
--label | Plugin label |
--plugin-id | Plugin id |
--hook | Generate hook to validate a field |
--field-id | Field id |
--bundle | Bundle |
Exemplos
Generate a validation constraint plugin specifying the module name, the class, its label, the plugin id, the entity bundle and the field id
drupal generate:plugin:validationconstraint \
--module="modulename" \
--class="ExampleConstraint" \
--label="Example validation constraint" \
-plugin-id="example_validation_constraint" \
--hook \
--field-id="field_exmaple_id" \
--bundle="entity_example_bundle" \
--no-interaction