backbone-maintenance 0.7.21

Minimal Backbone Framework module skeleton
Documentation
//! Validator for MaintenanceSchedule entity
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Returns an `EntityValidator<MaintenanceSchedule>` pre-loaded with schema-derived
//! field rules. Extend in the `// <<< CUSTOM` zone.

use backbone_core::{EntityValidator, ValidationErrors, ValidationError};
use backbone_core::{RequiredString};
use crate::domain::entity::MaintenanceSchedule;

/// Validator type alias for MaintenanceSchedule entities.
pub type MaintenanceScheduleValidator = EntityValidator<MaintenanceSchedule>;

/// Build a validator for MaintenanceSchedule with all schema-defined field rules.
pub fn maintenance_schedule_validator() -> MaintenanceScheduleValidator {
    EntityValidator::new()
        .rule(RequiredString::new("name", |e: &MaintenanceSchedule| &e.name))
    // <<< CUSTOM RULES
    // END CUSTOM RULES
}

// <<< CUSTOM
// END CUSTOM