Skip to content

Commit ebbebfd

Browse files
committed
IsEmpty validation doesn't make sense anymore since Length would pick up an empty input
1 parent ad5ec85 commit ebbebfd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/entity/user.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
2-
import { Length, IsEmail, IsNotEmpty } from 'class-validator';
2+
import { Length, IsEmail } from 'class-validator';
33

44
@Entity()
55
export class User {
@@ -9,7 +9,6 @@ export class User {
99
@Column({
1010
length: 80
1111
})
12-
@IsNotEmpty()
1312
@Length(10, 80)
1413
name: string;
1514

@@ -18,6 +17,5 @@ export class User {
1817
})
1918
@Length(10, 100)
2019
@IsEmail()
21-
@IsNotEmpty()
2220
email: string;
2321
}

0 commit comments

Comments
 (0)