Class: Validator

Validator


new Validator()

Validation functions.

Methods


<static> isValid(input)

If given input is null or undefined, false is returned otherwise true.

Parameters:
Name Type Description
input

Can be anything

Returns:
Type
boolean

<static> verifyInput(input, defaultValue)

If given input is null or undefined, the defaultValue is returned otherwise the given input.

Parameters:
Name Type Description
input

Can be anything

defaultValue

Can be anything

Returns:
Type
*