final phone validation move to ZZ default

close #16
This commit is contained in:
2020-12-09 19:09:20 +01:00
parent 0fc0b87c67
commit 4cfe9df429
3 changed files with 6 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import { IsBoolean, IsEmail, IsInt, IsNotEmpty, IsOptional, IsPhoneNumber, IsString, IsUUID } from "class-validator";
import { Column, Entity, JoinTable, ManyToMany, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { config } from '../../config';
import { Permission } from './Permission';
import { UserAction } from './UserAction';
import { UserGroup } from './UserGroup';
@@ -35,7 +36,7 @@ export class User {
*/
@Column({ nullable: true })
@IsOptional()
@IsPhoneNumber("ZZ")
@IsPhoneNumber(config.phone_validation_countrycode)
phone?: string;
/**