Skip to content

Commit f2c9bf2

Browse files
committed
add documentation
1 parent 0ac527b commit f2c9bf2

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ Name | Default text
15471547
`dateMin` | The '{field}' field must be greater than or equal to {expected}.
15481548
`dateMax` | The '{field}' field must be less than or equal to {expected}.
15491549
`forbidden` | The '{field}' field is forbidden.
1550-
‍‍`email` | The '{field}' field must be a valid e-mail.
1550+
`email` | The '{field}' field must be a valid e-mail.
15511551
`emailEmpty` | The '{field}' field must not be empty.
15521552
`emailMin` | The '{field}' field length must be greater than or equal to {expected} characters long.
15531553
`emailMax` | The '{field}' field length must be less than or equal to {expected} characters long.
@@ -1571,6 +1571,20 @@ Name | Description
15711571
`expected` | The expected value
15721572
`actual` | The actual value
15731573

1574+
# Pass custom metas
1575+
In some case, you will need to do something with the validation schema .
1576+
Like reusing the validator to pass custom settings, you can use properties starting with `$$`
1577+
1578+
````typescript
1579+
const check = v.compile({
1580+
$$name: 'Person',
1581+
$$description: 'write a description about this schema',
1582+
firstName: { type: "string" },
1583+
lastName: { type: "string" },
1584+
birthDate: { type: "date" }
1585+
});
1586+
````
1587+
15741588
# Development
15751589
```
15761590
npm run dev

0 commit comments

Comments
 (0)