Aller au contenu principal

generateEmailCheck()

generateEmailCheck(varName, ctx, customMessage?): CodeGenResult

Experimental

Generates inline code for the email format constraint. Uses externals to reference the shared EMAIL_REGEX pattern.


Parameters

varName: string

The variable name to check.

ctx: GeneratorContext

The generator context.

customMessage?: string

Optional custom error message.


Returns: CodeGenResult

Generated code and updated context.


Since

2.0.0