Numeric Rules

integer

Error code: 'NOT_INTEGER'

Example:

{ age: 'integer' }

positive_integer

Error code: 'NOT_POSITIVE_INTEGER'

Example:

{ age: 'positive_integer' }

decimal

Error code: 'NOT_DECIMAL'

Example:

{ price: 'decimal' }

positive_decimal

Error code: 'NOT_POSITIVE_DECIMAL'

Example:

{ price: 'positive_decimal' }

max_number

Error code: 'TOO_HIGH' or 'NOT_NUMBER'

Example:

{ age: { 'max_number': 95 } }

min_number

Error code: 'TOO_LOW' or 'NOT_NUMBER'

Example:

{ age: { 'min_number': 18 } }

number_between

Error code: 'TOO_HIGH' or 'TOO_LOW' or 'NOT_NUMBER'

Example:

{ age: { 'number_between': [18, 95] } }

results matching ""

    No results matching ""