Validation functions

Helper functions to easily validate values in API functions.

is­Num­ber(value, minValue, maxValue)

Checks if specified value is a number.

isSt­rin­g(value, minLength, maxLength)

Validates that a variable is a string with atleast one or more characters (as specified).

areE­qua­l(value1, value2)

Checks if value1 and value2 are equal.

are­NotE­qu­al(value1, value2)

Checks that two values are not equal.

is­Nul­l(value)

Checks if specified value is null.

is­Not­Nul­l(value)

Checks if specified value is not null.

is­Name(value)

Checks for first name and last name in string.

isE­mai­l(value)

Validates if string is an email.

as­ser­t(description, resultCode)

Throws a validation error if condition is false. Handy to use for validating arguments in an API function.

is­Date(value)

Checks if value is a date type.

is­Date­Tim­e(value)

Checks if value is a datetime type.