Skip to content

Commit

Permalink
docs: move regex docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DReigada authored Dec 19, 2023
1 parent 7a62d55 commit dd58d0f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Restrict to a minimum length
```directives: [constraints: [format: :uuid]]```
Ensure value is in a particular format

#### pattern
```directives: [constraints: [pattern: "^[A-Z][0-9a-z]*$"]]```
Ensure value follows a specific Regex pattern

Supported formats:
- `:uuid` - uses :elixir_uuid to validate the value
- `:email` - uses a regex to validate the value
Expand All @@ -103,9 +107,3 @@ Restrict to a minimum number of items
#### max
```directives: [constraints: [max_items: 5]]```
Restrict to a maximum number of items

### Regex

#### pattern
```directives: [constraints: [pattern: "^[A-Z][0-9a-z]*$"]]```
Ensure value follows a specific Regex pattern

0 comments on commit dd58d0f

Please sign in to comment.