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 { IsEmail, IsInt, IsNotEmpty, IsOptional, IsPhoneNumber, IsString } from 'class-validator';
import { getConnectionManager } from 'typeorm';
import { config } from '../../config';
import { AddressNotFoundError, AddressWrongTypeError } from '../../errors/AddressErrors';
import { Address } from '../entities/Address';
@@ -32,7 +33,7 @@ export abstract class CreateParticipant {
*/
@IsString()
@IsOptional()
@IsPhoneNumber("ZZ")
@IsPhoneNumber(config.phone_validation_countrycode)
phone?: string;
/**