forked from poppinss/indicative
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
31 lines (28 loc) · 895 Bytes
/
index.js
File metadata and controls
31 lines (28 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict'
/**
* indicative
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
const Validator = require('./src/Validator')
const Sanitization = require('./src/Sanitization')
const Formatters = require('./src/Formatters')
const Rule = require('./src/Rule')
Formatters.register('vanilla', require('./src/Formatters/Vanilla'))
Formatters.register('jsonapi', require('./src/Formatters/JSONAPI'))
Formatters.default('vanilla')
module.exports = {
validate: Validator.validate,
validateAll: Validator.validateAll,
extend: Validator.extend,
is: Validator.is,
'is.extend': Validator.is.extend,
sanitize: Sanitization.sanitize,
sanitizor: Sanitization.sanitizor,
rule: Rule,
'sanitizor.extend': Sanitization.sanitizor.extend,
formatters: Formatters
}