Skip to main content

Function: validateSafeEmail()

validateSafeEmail(input): boolean
Defined in: validators.ts:626 Refinement for email fields. Combines:
  1. RFC-style format check (length-bounded to ≤ 254 chars to prevent ReDoS).
  2. XSS / SQL / NoSQL / homoglyph detectors — emails are extremely constrained and should never legitimately contain HTML or query operators.

Parameters

input

string

Returns

boolean true when both checks pass.