Modular Forms is in maintenance mode. We recommend Formisch, its official successor, for new projects.

pattern

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

const validate = pattern(requirement, error);

Parameters

  • requirement RegExp
  • error string

Return