Module: mendix/validator

Number validation helpers.

Members

(static, constant) validation :number

Validation result constants.

Type:
  • number

Methods

(static) validate(value, type) → {number}

Validates the value of the given type and returns validation.OK or the error value of the first failed validation.

Parameters:
Name Type Description
value *

value to validate

type string

type of the value to validate

Returns:

validation result constant

Type
number
Example
// Should return true
validator.validate("100.12", "Integer") === validator.validation.NOT_INTEGER