generateMaxCheck()
generateMaxCheck(
varName,max,ctx,customMessage?):CodeGenResult
Experimental
Generates inline code for the max constraint (inclusive).
Parametersโ
varName: stringโ
The variable name to check
max: numberโ
Maximum value (inclusive)
ctx: GeneratorContextโ
The generator context
customMessage?: stringโ
Optional custom error message
Returns: CodeGenResultโ
Generated code and updated context
Sinceโ
2.0.0