Home > @websublime/schema > ArraySchemaType
ArraySchemaType class
Array model type validation
Signature:
export declare class ArraySchemaType<T> extends BaseSchemaType<Array<T>>
Extends: BaseSchemaType<Array<T>>
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(items, errorMessage) | Create ArraySchemaType instance |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
items | InferSchemaType<T> | null | items model type | |
type | string |
Methods
Method | Modifiers | Description |
---|---|---|
check(values, parent, context, drill) | Validate array | |
maxLength(maxLength, errorMessage) | Test array maximum length | |
minLength(minLength, errorMessage) | Test array minimum length | |
of(items) | Set items model type | |
rangeLength(minLength, maxLength, errorMessage) | Test if array length is between range |