backbone-mail 0.2.32

Odoo mail core port — message/notification/followers/activity/alias/sms queue (schema: messaging)
//! Validator for MailGatewayAllowed entity
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Returns an `EntityValidator<MailGatewayAllowed>` 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::MailGatewayAllowed;

/// Validator type alias for MailGatewayAllowed entities.
pub type MailGatewayAllowedValidator = EntityValidator<MailGatewayAllowed>;

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

// <<< CUSTOM
// END CUSTOM