Skip to content

allow validation chaining#2116

Merged
patriksvensson merged 2 commits into
spectreconsole:mainfrom
AntekOlszewski:allow-validation-chaining
May 17, 2026
Merged

allow validation chaining#2116
patriksvensson merged 2 commits into
spectreconsole:mainfrom
AntekOlszewski:allow-validation-chaining

Conversation

@AntekOlszewski

Copy link
Copy Markdown
Contributor

Fixes #1742

  • I have read the Contribution Guidelines
  • I have checked that there isn't already another pull request that solves the above issue
  • All newly added code is adequately covered by tests
  • All existing tests are still running without errors

Changes

This change was previously proposed in #1973 but became outdated.
This PR reintroduces the same fix on top of the current codebase.
Changes from outdated PR - tests splited into separate ones, since 1 test checked 3 different things, logic unchanged.


Please upvote 👍 this pull request if you are interested in it.

@patriksvensson patriksvensson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests for three chained validations as well?

Comment thread src/Spectre.Console.Tests/Unit/Prompts/TextPromptTests.cs
@patriksvensson patriksvensson merged commit 09da796 into spectreconsole:main May 17, 2026
3 checks passed
This was referenced Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextPrompt.Validate does not chain

2 participants