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 PosProfile entity
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Returns an `EntityValidator<PosProfile>` pre-loaded with schema-derived
//! field rules. Extend in the `// <<< CUSTOM` zone.

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

/// Validator type alias for PosProfile entities.
pub type PosProfileValidator = EntityValidator<PosProfile>;

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

// <<< CUSTOM
// END CUSTOM