Skip to main content

pidgin_lang/validator/
mod.rs

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