armature-validation
Request validation for the Armature framework.
Features
- Derive Macro -
#[derive(Validate)]for structs - Built-in Rules - Email, URL, length, range, regex, etc.
- Custom Validators - Create your own validation rules
- Nested Validation - Validate nested structs
- Error Messages - Customizable error messages
Installation
[]
= "0.1"
Quick Start
use ;
Available Validators
| Validator | Description |
|---|---|
email |
Valid email address |
url |
Valid URL |
length(min, max) |
String length bounds |
range(min, max) |
Numeric range |
regex(pattern) |
Regex match |
required |
Non-empty value |
custom(fn) |
Custom function |
Custom Validators
License
MIT OR Apache-2.0