Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Matching/Validation lambda function for prompt input #3047

Open
WuerfelDev opened this issue Jul 21, 2023 · 1 comment
Open

[REQUEST] Matching/Validation lambda function for prompt input #3047

WuerfelDev opened this issue Jul 21, 2023 · 1 comment

Comments

@WuerfelDev
Copy link

WuerfelDev commented Jul 21, 2023

Have you checked the issues for a similar suggestions?

#2938 #1845 #1886

How would you improve Rich?

Many people want to match/validate the prompt input in other ways than predefined. While it's possible to create a subclass, it would be a lot easier to just pass in a lambda function as optional parameter that replaces the default check_choice.

What problem does it solve for you?

Primarily a documented way to change the validation. It's way easier because you don't need no subclass
In my case it solves case insensitive matching and fuzzy matching.

@github-actions
Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant