Aller au contenu principal

generateVoidValidation()

generateVoidValidation(varName, ctx, customTypeMessage?): object

Experimental

Generates complete validation code for a void schema.


Parameters

varName: string

The variable name to validate

ctx: GeneratorContext

The generator context

customTypeMessage?: string

Optional custom type error message


Returns: object

Generated code lines and updated context

code: string[]

ctx: GeneratorContext


Since

2.0.0