Skip to main content

pidgin_lang/validator/
mod.rs

1pub mod schema;
2/// Validator — syntax and schema validation for parsed Pidgin packets.
3///
4/// This module contains two sub-validators:
5///
6/// - **`syntax`**: structural completeness — required fields present, types
7///   match expectations (e.g., `in` fields must be lists), field cardinality.
8/// - **`schema`**: business-rule validation — workflow exists in registry,
9///   mode is in allowed modes, risk level is valid, output names are expected.
10///
11/// `ValidationError` has an error `code` (for programmatic handling) and a
12/// `message` (for human-readable output).
13pub mod syntax;
14
15#[derive(Debug, Clone)]
16pub struct ValidationError {
17    pub code: String,
18    pub message: String,
19}