Function pattern

Validates that a string property matches the given regular expression pattern.

`@pattern(/^[A-Z]{2}\d{3}$/) code: string;`
  • Parameters

    • regex: RegExp

      The regular expression to test against

    Returns PropertyDecorator