Add json examples to Capitalize and Choice transformers in README
This commit is contained in:
parent
26c5433d16
commit
4dd7399b50
1 changed files with 18 additions and 2 deletions
20
README.md
20
README.md
|
|
@ -140,14 +140,30 @@ Rules are objects with two fields:
|
|||
|
||||
### Transformers
|
||||
|
||||
|
||||
|
||||
#### Capitalize
|
||||
|
||||
```json
|
||||
{
|
||||
"Capitalize": {}
|
||||
}
|
||||
```
|
||||
|
||||
Transforms string fields into Capital Case.
|
||||
|
||||
#### Choice
|
||||
|
||||
```json
|
||||
{
|
||||
"Choice": {
|
||||
"choices": [
|
||||
"A",
|
||||
"B",
|
||||
"C"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Only accepts a pre-defined list of acceptable values and rejects the rest.
|
||||
|
||||
#### Date
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue