A minimal and reliable C++ library for validating user input.
CPP Input Validation Library helps you ensure that the data entered by the user is safe, clean, and meets your expected criteria, with clear prompts and reusable functions.
- Easy-to-use input validation functions
- Supports validation for strings, integers, floats, and doubles
- Range-checking for numeric input
- Date range validation
- Clear prompts and simple integration
- No dependencies — pure C++
- Perfect for command-line tools, beginner projects, and robust systems
| Function Name | Description |
|---|---|
ReadString |
Reads a line of input from the user as a string |
ReadIntNumber |
Reads a valid integer from user input |
ReadIntNumberBetween |
Reads an integer within a specified range |
ReadFloatNumber |
Reads a valid float number |
ReadFloatNumberBetween |
Reads a float number within a specified range |
ReadDblNumber |
Reads a valid double-precision number |
ReadDblNumberBetween |
Reads a double number within a specified range |
IsNumberBetween |
Checks whether a number lies between two bounds |
IsDateBetween |
Checks whether a given date falls within a date range |
💡 Use these functions to simplify repetitive validation logic and improve user experience.
Clone the repository:
[git clone https://github.com/Abdullah-Dwaih/Input-Validation-Library.git](https://github.com/Abdullah-Dwaih/Input-Validate-Library.git)