pattern

Creates a validation functions that validates the pattern of a string.

const validate = pattern(requirement, error);

Parameters

  • requirement RegExp
  • error string

Return

  • validate QRL<(value: MaybeValue<string>) => string>