Skip to content

Commit f4d73cf

Browse files
committed
Merge branch 'master' of github.com:icebob/fastest-validator
2 parents 1f681f5 + c6c6d8e commit f4d73cf

File tree

5 files changed

+194
-96
lines changed

5 files changed

+194
-96
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
# fastest-validator [![NPM version](https://img.shields.io/npm/v/fastest-validator.svg)](https://www.npmjs.com/package/fastest-validator) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=The%20fastest%20JS%20validator%20library%20for%20NodeJS&url=https://github.com/icebob/fastest-validator&via=Icebobcsi&hashtags=nodejs,javascript)
1010
:zap: The fastest JS validator library for NodeJS | Browser | Deno.
1111

12-
**If you like my work, please [donate](https://www.paypal.me/meregnorbert). Thank you!**
13-
1412
## Key features
1513
* blazing fast! Really!
16-
* 15+ built-in validators
14+
* 20+ built-in validators
1715
* many sanitizations
1816
* custom validators & aliases
1917
* nested objects & array handling
@@ -104,6 +102,7 @@ $ npm run bench
104102
- [Personalised Messages](#personalised-messages)
105103
- [Message types](#message-types)
106104
- [Message fields](#message-fields)
105+
- [Plugins](#plugins)
107106
- [Development](#development)
108107
- [Test](#test)
109108
- [Coverage report](#coverage-report)
@@ -1201,6 +1200,21 @@ v.validate({ firstname: "John", lastname: 23 }, schema );
12011200
]
12021201
*/
12031202
```
1203+
# Plugins
1204+
You can apply plugins:
1205+
```js
1206+
// Plugin Side
1207+
function myPlugin(validator){
1208+
// you can modify validator here
1209+
// e.g.: validator.add(...)
1210+
}
1211+
1212+
// Validator Side
1213+
const v = new Validator();
1214+
v.plugin(myPlugin)
1215+
1216+
```
1217+
12041218
# Message types
12051219
Name | Default text
12061220
------------------- | -------------

0 commit comments

Comments
 (0)