Comments (5)
No, that needs changes in the interaction logic for prompts. You can either write one yourself or if it's something common like a number, then contribute it to the library.
from dialoguer.
I added some basic input validation functionality, including prebuilt phone number and email address validators. Are there any other validators that you think should be in by default?
from dialoguer.
Would it be possible to disallow the user to even enter characters for example?
So like we could set an Input to be numeric only, and pressing non-digits has no effect?
I haven't checked the source code to see if you handle it as a line of input or character by character, so this might not be possible.
from dialoguer.
@batisteo I don't know when it was added, but there exists an input validation feature now. If you have some spare time, can you check if this is what you originally envisioned when you opened the issue?
from dialoguer.
I guess it would do it. I was thinking about including some common ones (int, str, email…) but I far as I can see it seems very flexible solution.
from dialoguer.
Related Issues (20)
- Feature request: alert message with pressing enter as only option
- Add some example pictures to the readme with links to the corresponding file in examples.
- Tab completion doesn't work on windows. HOT 1
- Backspace behavior at the end of line
- Handling Interrupt Signals (e.g., Ctrl+C) in `Select` and Other Dialoguer Actions HOT 4
- Duplicate line when wrapped HOT 1
- `Password`: Returns `Err` when used in conjunction with input via redirect or pipe HOT 2
- feat: support multi line input HOT 1
- [Issue] No visual indecator on selected items on Windows Terminal HOT 1
- Feature request: custom keyboard interactions
- Add support for asynchronous non-blocking I/O.
- Add header and footer options to (Fuzzy)Select (for making borders/tables)
- error[E0195]: lifetime parameters or bounds on type `Target` do not match the trait declaration HOT 2
- Feature: Third option for confirm prompt HOT 1
- `Input` post completion text does not appear if the user uses the default
- Request: add screenshots of what it can do to the README
- Save and restore a wizard flow HOT 1
- FuzzySelect messes up existing formatting
- Wide items in fuzzy select make the prompt disappear
- typos in CHANGELOG: dialouger -> dialoguer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dialoguer.