https://github.com/afucher/inquirer
A collection of common interactive command line user interfaces.
https://github.com/afucher/inquirer
csharp hacktoberfest
Last synced: 8 months ago
JSON representation
A collection of common interactive command line user interfaces.
- Host: GitHub
- URL: https://github.com/afucher/inquirer
- Owner: afucher
- License: mit
- Created: 2017-09-12T14:17:15.000Z (almost 9 years ago)
- Default Branch: dev
- Last Pushed: 2022-07-11T11:56:11.000Z (almost 4 years ago)
- Last Synced: 2025-06-22T20:16:52.057Z (about 1 year ago)
- Topics: csharp, hacktoberfest
- Language: C#
- Homepage:
- Size: 94.7 KB
- Stars: 17
- Watchers: 1
- Forks: 15
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Inquirer

A collection of common interactive command line user interfaces in C#.
## Examples
You can find some examples in the [samples](/samples/Samples/Basic) project.
## Inputs
- Basic Input
- Numeric Input
- Confirmation Input
- List Input
- Password Input
## Validation
You can set your own valid using the `SetValid` method in the input. It receives an object that must implement the `IValidator` interface.
```csharp
var numbersOnly = new RegexValidator("^[0-9]*$");
ageInput.SetValid(numbersOnly);
```
We already have some validators that you can use:
- RegexValidator
- NumericValidator
- CreditCardNumberValidator
- EmailValidator
- DateValidator
But feel free to implement yours or contribute with more validators 😉
## Running the tests
Go to folder `src` and run:
```
dotnet test
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## Acknowledgments
Inpired by [SBoundrias/Inquirer.js](https://github.com/SBoudrias/Inquirer.js/)