Module

mendix/validator

Number validation helpers.

Members

number

# static constant validation

Validation result constants.

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

validation result constant

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