Aller au contenu principal

generateUrlCheck()

generateUrlCheck(varName, ctx, customMessage?): CodeGenResult

Experimental

Generates inline code for the URL format constraint. Uses externals to reference the shared URL_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