Skip to content

Document Validator constraints support for Console Questions#21969

Open
lacatoire wants to merge 3 commits intosymfony:8.1from
lacatoire:docs/console-question-constraints
Open

Document Validator constraints support for Console Questions#21969
lacatoire wants to merge 3 commits intosymfony:8.1from
lacatoire:docs/console-question-constraints

Conversation

@lacatoire
Copy link
Contributor

This documents the new Question::setConstraints() method and the constraints parameter of the #[Ask] attribute, introduced in Symfony 8.1 via symfony/symfony#63359.

Changes

  • components/console/helpers/questionhelper.rst: Added "Using Validator Constraints" subsection under "Validating the Answer", documenting setConstraints() with a code example, execution order with custom validators, and a versionadded directive.
  • console/input.rst: Added "Validating Input with Constraints" subsection under the invokable commands input DTO section, documenting the constraints parameter of #[Ask] with a code example, a versionadded directive, and a seealso cross-reference.

Fixes #21963

@carsonbot carsonbot added this to the 8.1 milestone Feb 12, 2026
@carsonbot carsonbot changed the title Document Validator constraints support for Console Questions Document Validator constraints support for Console Questions Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants