Repository navigation
v1.0.0
Nitro Validator v1.0.0
A powerful, standalone, dependency-free data validation library for Python.
Highlights
- Zero Dependencies - No external packages required
- 51+ Built-in Rules - Comprehensive validation coverage out of the box
- Simple API - Clean, pipe-delimited syntax inspired by Laravel/GUMP
- Fully Extensible - Create custom rules by extending NitroValidationRule
- 100% Test Coverage - Thoroughly tested and production-ready
Features
- String validation: email, url, uuid, ip, json, regex, and more
- Numeric validation: min, max, between, integer, positive, negative
- Date validation: date, before, after, date_format
- Cross-field validation: same, different, confirmed
- Collection validation: array, size, distinct
- Custom error messages per field or per rule
- Type-safe with full type hints and PEP 561 compliance
Quick Start
pip install nitro-validator
from nitro_validator import NitroValidator, NitroValidationError
validator = NitroValidator()
data = {'email': 'user@example.com', 'age': 25}
rules = {'email': 'required|email', 'age': 'required|numeric|min:18'}
validated = validator.validate(data, rules)Requirements
- Python 3.7+