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