class NonEmptyArrayRule

Rule for validating non-empty arrays

Constructors

new
NonEmptyArrayRule(
fieldName: string,
fieldExtractor: (item: T) =>
readonly any[]
| any[]
| undefined
,
)

Type Parameters

Properties

readonly
name: string

Methods

validate(item: T): Promise<ValidationResult>

Usage

import { NonEmptyArrayRule } from ".";