mimeType

Creates a validation functions that validates the file type.

const validate = mimeType(requirement, error);

Parameters

  • requirement string | string[]
  • error string

Return

  • validate (value: MaybeValue<File | File[]>) => string