Skip to content

Commit

Permalink
IsEmpty validation doesn't make sense anymore since Length would pick…
Browse files Browse the repository at this point in the history
… up an empty input
  • Loading branch information
javieraviles committed Jun 26, 2018
1 parent ad5ec85 commit ebbebfd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/entity/user.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { Length, IsEmail, IsNotEmpty } from 'class-validator';
import { Length, IsEmail } from 'class-validator';

@Entity()
export class User {
Expand All @@ -9,7 +9,6 @@ export class User {
@Column({
length: 80
})
@IsNotEmpty()
@Length(10, 80)
name: string;

Expand All @@ -18,6 +17,5 @@ export class User {
})
@Length(10, 100)
@IsEmail()
@IsNotEmpty()
email: string;
}

0 comments on commit ebbebfd

Please sign in to comment.