Skip to main content

validate_email

Function validate_email 

Source
pub fn validate_email(field: &'static str, value: &str) -> Result<(), CoolError>
Expand description

Pragmatic email check: requires exactly one @, non-empty local and domain parts, at least one . in the domain, and no whitespace. Not a full RFC 5322 grammar — that grammar admits forms (quoted local parts, IP literals) banks rarely accept anyway. Reject early; let real KYC flows do deeper validation.