You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows use of decorator and non-decorator based validation. Internally uses [validator.js][1] to perform validation.
9
+
Allows use of decorator and non-decorator based validation.
10
+
Internally uses [validator.js][1] to perform validation.
11
+
Class-validator works on both browser and node.js platforms.
10
12
11
13
## Installation
12
14
13
-
1.Install module:
15
+
Install module:
14
16
15
-
`npm install class-validator --save`
17
+
`npm install class-validator --save`
16
18
17
-
2. ES6 features are used, so you may want to install [es6-shim](https://github.com/paulmillr/es6-shim) too:
19
+
#### Old versions of node.js/browser
18
20
19
-
`npm install es6-shim --save`
21
+
ES6 features are used, if you are using old versions of node (or browser) you may want to install [es6-shim](https://github.com/paulmillr/es6-shim) too:
20
22
21
-
and use it somewhere in the global place of your app:
23
+
`npm install es6-shim --save`
22
24
23
-
* for nodejs: `require("es6-shim")` (or `import "es6-shim";`) in your app's entry point (for example in `app.ts`)
24
-
* for browser: `<script src="node_modules/es6-shim/es6-shim.js">` in your `index.html`
25
+
and use it somewhere in the global place of your app:
25
26
26
-
For node.js users this step is only required if you are using old versions of node.
27
+
* for nodejs: `require("es6-shim")` (or `import "es6-shim";`) in your app's entry point (for example in `app.ts`)
28
+
* for browser: `<script src="node_modules/es6-shim/es6-shim.js">` in your `index.html`
29
+
30
+
This step is only required if you are using old versions of node/browser.
31
+
32
+
#### Using in browser
33
+
34
+
If you are using class-validator with system.js in browser then use following configuration:
0 commit comments