1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! # skp-validator
//!
//! The most advanced, flexible and modular validation library for Rust.
//!
//! ## Features
//!
//! - **Declarative Validation**: Use derive macros with powerful attributes
//! - **30+ Built-in Validators**: email, url, ip, uuid, phone, credit_card, etc.
//! - **Nested Validation**: Automatic validation of nested structs
//! - **Collection Validation**: Dive into Vec, HashMap, Option
//! - **Field Dependencies**: Conditional validation based on other fields
//! - **Field Transformations**: uppercase, lowercase, trim
//! - **Structured Errors**: Nested, JSON-serializable error format
//! - **Runtime JSON Validation**: Validate JSON without deserialization
//! - **i18n Support**: Localized error messages
//! - **Framework Adapters**: Axum, Actix integration
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use skp_validator::Validate;
//!
//! #[derive(Validate)]
//! struct User {
//! #[validate(required, length(min = 3, max = 50))]
//! name: String,
//!
//! #[validate(required, email)]
//! email: String,
//!
//! #[validate(range(min = 18, max = 120))]
//! age: Option<u32>,
//!
//! #[validate(nested)]
//! address: Address,
//!
//! #[validate(dive, length(min = 1, max = 20))]
//! tags: Vec<String>,
//! }
//!
//! let user = User { /* ... */ };
//! match user.validate() {
//! Ok(()) => println!("Valid!"),
//! Err(errors) => println!("Errors: {}", errors),
//! }
//! ```
// Re-export core types
pub use *;
// Re-export rules
pub use skp_validator_rules as rules;
// Re-export derive macro
pub use Validate;
/// Prelude for convenient imports