---
jsApi: true
title: "[F] $pattern"

---
```ts
$pattern(
   context, 
   target, 
   pattern, 
   validationMessage?): void
```

## Parameters

| Parameter | Type |
| :------ | :------ |
| `context` | [`DecoratorContext`](../interfaces/DecoratorContext.md) |
| `target` | [`ModelProperty`](../interfaces/ModelProperty.md) \| [`Scalar`](../interfaces/Scalar.md) |
| `pattern` | `string` |
| `validationMessage`? | `string` |

## Returns

`void`
