Skip to main content

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