backbone-pos 0.7.1

Point of sale — cashier session, ticket + multi-tender; orchestrates billing (revenue) + payment (settlement), posts no GL directly
Documentation
//! Validator for PosTable entity
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Returns an `EntityValidator<PosTable>` 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::PosTable;

/// Validator type alias for PosTable entities.
pub type PosTableValidator = EntityValidator<PosTable>;

/// Build a validator for PosTable with all schema-defined field rules.
pub fn pos_table_validator() -> PosTableValidator {
    EntityValidator::new()
        .rule(OptionalNotBlank::new("name", |e: &PosTable| e.name.as_deref()))
        .rule(OptionalNotBlank::new("shape", |e: &PosTable| e.shape.as_deref()))
    // <<< CUSTOM RULES
    // END CUSTOM RULES
}

// <<< CUSTOM
// END CUSTOM