@hmcts/class-validator
Advanced tools
Comparing version 0.9.1-c to 0.9.1-d
{ | ||
"name": "@hmcts/class-validator", | ||
"version": "0.9.1-c", | ||
"version": "0.9.1-d", | ||
"description": "Class-based validation with Typescript / ES6 / ES5 using decorators or validation schemas. Supports both node.js and browser", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -52,3 +52,3 @@ # class-validator | ||
```typescript | ||
```javascript | ||
import {validate, Contains, IsInt, Length, IsEmail, IsFQDN, IsDate, Min, Max} from "class-validator"; | ||
@@ -123,3 +123,3 @@ | ||
```typescript | ||
```javascript | ||
{ | ||
@@ -138,3 +138,3 @@ target: Object; // Object that was validated. | ||
```typescript | ||
```javascript | ||
[{ | ||
@@ -161,3 +161,3 @@ target: /* post object */, | ||
```typescript | ||
```javascript | ||
validator.validate(post, { validationError: { target: false } }); | ||
@@ -174,3 +174,3 @@ ``` | ||
```typescript | ||
```javascript | ||
import {MinLength, MaxLength} from "class-validator"; | ||
@@ -198,3 +198,3 @@ | ||
```typescript | ||
```javascript | ||
import {MinLength, MaxLength} from "class-validator"; | ||
@@ -216,3 +216,3 @@ | ||
```typescript | ||
```javascript | ||
import {MinLength, MaxLength, ValidationArguments} from "class-validator"; | ||
@@ -247,3 +247,3 @@ | ||
```typescript | ||
```javascript | ||
import {MinLength, MaxLength} from "class-validator"; | ||
@@ -267,3 +267,3 @@ | ||
```typescript | ||
```javascript | ||
import {ValidateNested} from "class-validator"; | ||
@@ -283,3 +283,3 @@ | ||
```typescript | ||
```javascript | ||
import {validate} from "class-validator"; | ||
@@ -326,3 +326,3 @@ | ||
```typescript | ||
```javascript | ||
import {ValidateIf, IsNotEmpty} from "class-validator"; | ||
@@ -348,3 +348,3 @@ | ||
```typescript | ||
```javascript | ||
import {validate} from "class-validator"; | ||
@@ -358,3 +358,3 @@ // ... | ||
```typescript | ||
```javascript | ||
import {validate, Allow, Min} from "class-validator"; | ||
@@ -390,3 +390,3 @@ | ||
```typescript | ||
```javascript | ||
import {validate} from "class-validator"; | ||
@@ -429,3 +429,3 @@ // ... | ||
```typescript | ||
```javascript | ||
import {validate} from "class-validator"; | ||
@@ -445,3 +445,3 @@ // ... | ||
```typescript | ||
```javascript | ||
import {validate, Min, Length} from "class-validator"; | ||
@@ -496,3 +496,3 @@ | ||
```typescript | ||
```javascript | ||
import {ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments} from "class-validator"; | ||
@@ -529,3 +529,3 @@ | ||
```typescript | ||
```javascript | ||
import {Validate} from "class-validator"; | ||
@@ -548,3 +548,3 @@ import {CustomTextLength} from "./CustomTextLength"; | ||
```typescript | ||
```javascript | ||
import {validate} from "class-validator"; | ||
@@ -559,3 +559,3 @@ | ||
```typescript | ||
```javascript | ||
import {Validate} from "class-validator"; | ||
@@ -576,3 +576,3 @@ import {CustomTextLength} from "./CustomTextLength"; | ||
```typescript | ||
```javascript | ||
import {ValidationArguments, ValidatorConstraint, ValidatorConstraintInterface} from "class-validator"; | ||
@@ -597,3 +597,3 @@ | ||
```typescript | ||
```javascript | ||
import {registerDecorator, ValidationOptions, ValidationArguments} from "class-validator"; | ||
@@ -625,3 +625,3 @@ | ||
```typescript | ||
```javascript | ||
import {IsLongerThan} from "./IsLongerThan"; | ||
@@ -647,3 +647,3 @@ | ||
```typescript | ||
```javascript | ||
import {registerDecorator, ValidationOptions, ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments} from "class-validator"; | ||
@@ -680,3 +680,3 @@ | ||
```typescript | ||
```javascript | ||
import {IsUserAlreadyExist} from "./IsUserAlreadyExist"; | ||
@@ -699,3 +699,3 @@ | ||
```typescript | ||
```javascript | ||
import {Container} from "typedi"; | ||
@@ -722,3 +722,3 @@ import {useContainer, Validator} from "class-validator"; | ||
```typescript | ||
```javascript | ||
import {Validator} from "class-validator"; | ||
@@ -914,3 +914,3 @@ | ||
```typescript | ||
```javascript | ||
import {ValidationSchema} from "class-validator"; | ||
@@ -945,3 +945,3 @@ export let UserValidationSchema: ValidationSchema = { // using interface here is not required, its just for type-safety | ||
```typescript | ||
```javascript | ||
import {registerSchema} from "class-validator"; | ||
@@ -956,3 +956,3 @@ import {UserValidationSchema} from "./UserValidationSchema"; | ||
```typescript | ||
```javascript | ||
import {validate} from "class-validator"; | ||
@@ -959,0 +959,0 @@ const user = { firstName: "Johny", secondName: "Cage", email: "johny@cage.com" }; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
443169
62
4183