NumberSchemaExtensions extension

Adds fluent validation methods to NumberSchema.

on

Methods

finite() → NumberSchema

Available on NumberSchema, provided by the NumberSchemaExtensions extension

Adds a constraint that the number must be finite.
greaterThan(num n) → NumberSchema

Available on NumberSchema, provided by the NumberSchemaExtensions extension

Adds a constraint that the number must be greater than n.
lessThan(num n) → NumberSchema

Available on NumberSchema, provided by the NumberSchemaExtensions extension

Adds a constraint that the number must be less than n.
max(num n) → NumberSchema

Available on NumberSchema, provided by the NumberSchemaExtensions extension

Adds a constraint that the number must be less than or equal to n.
min(num n) → NumberSchema

Available on NumberSchema, provided by the NumberSchemaExtensions extension

Adds a constraint that the number must be greater than or equal to n.
multipleOf(num n) → NumberSchema

Available on NumberSchema, provided by the NumberSchemaExtensions extension

Adds a constraint that the number must be a multiple of n.
negative() → NumberSchema

Available on NumberSchema, provided by the NumberSchemaExtensions extension

Adds a constraint that the number must be negative (< 0).
positive() → NumberSchema

Available on NumberSchema, provided by the NumberSchemaExtensions extension

Adds a constraint that the number must be positive (> 0).