backbone-events 0.4.0

Events core + the sale/booth/crm/sms/desk overlay — registrations under one authoritative seat counter, the sale seam (order-minted registrations, forward-only paid heal, SO-cancel mirror cascade), booth bookings with the DB exclusivity wall, closed-vocabulary lead rules through a host sink port, the dual-channel (mail/sms) self-arming scheduler, and the exact-match desk verb (Odoo event port, core + overlay)
//! Validator for BoothBooking entity
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Returns an `EntityValidator<BoothBooking>` pre-loaded with schema-derived
//! field rules. Extend in the `// <<< CUSTOM` zone.

use backbone_core::{EntityValidator, ValidationErrors, ValidationError};
use backbone_core::{OptionalNotBlank};
use crate::domain::entity::BoothBooking;

/// Validator type alias for BoothBooking entities.
pub type BoothBookingValidator = EntityValidator<BoothBooking>;

/// Build a validator for BoothBooking with all schema-defined field rules.
pub fn booth_booking_validator() -> BoothBookingValidator {
    EntityValidator::new()
        .rule(OptionalNotBlank::new("contact_name", |e: &BoothBooking| e.contact_name.as_deref()))
        .rule(OptionalNotBlank::new("contact_email", |e: &BoothBooking| e.contact_email.as_deref()))
        .rule(OptionalNotBlank::new("contact_phone", |e: &BoothBooking| e.contact_phone.as_deref()))
    // <<< CUSTOM RULES
    // END CUSTOM RULES
}

// <<< CUSTOM
// END CUSTOM