Validation operations
You can use the following helper methods to validate various types, compare value, and perform regular expression matching on strings.
Last updated
You can use the following helper methods to validate various types, compare value, and perform regular expression matching on strings.
Last updated
Description
Example
Result
Is the value numeric
{{isNumeric '12.3'}}
true
Is the value alphanumeric
{{isAlphanumeric 'abc!@123'}}
false
Is the value a boolean
{{isBool (Request.Body 'jsonpath' '$.paidInFull')}}
Where the payload is {“paidInFull”:”false”}
true
Is one value greater than another
{{isGreater (Request.Body 'jsonpath' '$.age') 25}}
Where the payload is {“age”:”19”}
false
Is one value less than another
{{isLess (Request.Body 'jsonpath' '$.age') 25}}
Where the payload is {“age”:”19”}
true
Is a value between two values
{{isBetween (Request.Body 'jsonpath' '$.age') 25 35}}
Where the payload is {“age”:”19”}
false
Does a string match a regular expression
{{matchesRegex '2022-09-27' '^\d{4}-\d{2}-\d{2}$'}}
true