UNPKG

express-image-validator

Version:

Validator of various image parameters in Express.js applications

13 lines (12 loc) 597 B
import type { FieldSchema } from '../types/options'; import type { FieldSet } from '../types/field'; /** * Normalizes a field or set of fields into an array of full schemas. * - Strings are converted into `FieldSchema` with default options. * - Objects are validated and normalized via `normalizeValidationOptions`. * @param { FieldSet } field Field or array of fields. * @returns { FieldSchema[] } Normalized field schemas. * @throws { Error } If field is empty or invalid. * @see normalizeValidationOptions */ export declare function normalizeImageField(field: FieldSet): FieldSchema[];