PURE invariant: IdentityValue must look like its IdentityType. Returns the error, or null
when valid (or when not shape-checkable — AccountID is opaque, and missing values are the sync
validator's job).
Email: a single @ with non-empty local part and a dotted domain.
PhoneNumber: an optional leading + followed by 7–15 digits (E.164-ish), tolerating spaces,
dashes, parentheses, and dots as separators.
PURE invariant:
IdentityValuemust look like itsIdentityType. Returns the error, ornullwhen valid (or when not shape-checkable —AccountIDis opaque, and missing values are the sync validator's job).Email: a single@with non-empty local part and a dotted domain.PhoneNumber: an optional leading+followed by 7–15 digits (E.164-ish), tolerating spaces, dashes, parentheses, and dots as separators.AccountID: opaque — no shape enforced.