generateStartsWithCheck()
generateStartsWithCheck(
varName,prefix,ctx,customMessage?):CodeGenResult
Experimental
Generates inline code for the startsWith constraint.
Parametersβ
varName: stringβ
The variable name to check.
prefix: stringβ
The required prefix.
ctx: GeneratorContextβ
The generator context.
customMessage?: stringβ
Optional custom error message.
Returns: CodeGenResultβ
Generated code and updated context.
Sinceβ
2.0.0