Home > @websublime/schema > NumberSchemaType
NumberSchemaType class
Number model type validation
Signature:
export declare class NumberSchemaType extends BaseSchemaType<number>
Extends: BaseSchemaType<number>
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(errorMessage) | Create NumberSchemaType instance |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
type | string |
Methods
Method | Modifiers | Description |
---|---|---|
isInteger(errorMessage) | Test if number is integer. | |
isOneOf(values, errorMessage) | Test if is one of other types included | |
max(max, errorMessage) | Test value if it is lower or equal to maximum value | |
min(min, errorMessage) | Test value if great or equal to minimum value | |
pattern(regexp, errorMessage) | Test a reg expression | |
range(min, max, errorMessage) | Test if value is between the range |