generateLteCheck()
generateLteCheck(
varName,lessThanOrEqual,ctx,customMessage?):CodeGenResult
Experimental
Generates inline code for the lte constraint (inclusive less than or equal).
Parametersβ
varName: stringβ
The variable name to check
lessThanOrEqual: numberβ
Upper bound (inclusive)
ctx: GeneratorContextβ
The generator context
customMessage?: stringβ
Optional custom error message
Returns: CodeGenResultβ
Generated code and updated context
Sinceβ
2.0.0