@@ -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';
|
||||
import { GroupContact } from '../entities/GroupContact';
|
||||
@@ -40,7 +41,7 @@ export class CreateGroupContact {
|
||||
* Optional
|
||||
*/
|
||||
@IsOptional()
|
||||
@IsPhoneNumber("DE")
|
||||
@IsPhoneNumber(config.phone_validation_countrycode)
|
||||
phone?: string;
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
IsString
|
||||
} from "class-validator";
|
||||
import { Column, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { config } from '../../config';
|
||||
import { Address } from "./Address";
|
||||
import { RunnerGroup } from "./RunnerGroup";
|
||||
|
||||
@@ -62,7 +63,7 @@ export class GroupContact {
|
||||
*/
|
||||
@Column({ nullable: true })
|
||||
@IsOptional()
|
||||
@IsPhoneNumber("DE")
|
||||
@IsPhoneNumber(config.phone_validation_countrycode)
|
||||
phone?: string;
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
IsString
|
||||
} from "class-validator";
|
||||
import { Column, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn, TableInheritance } from "typeorm";
|
||||
import { config } from '../../config';
|
||||
import { Address } from "./Address";
|
||||
import { Donation } from "./Donation";
|
||||
|
||||
@@ -62,7 +63,7 @@ export abstract class Participant {
|
||||
*/
|
||||
@Column({ nullable: true })
|
||||
@IsOptional()
|
||||
@IsPhoneNumber("DE")
|
||||
@IsPhoneNumber(config.phone_validation_countrycode)
|
||||
phone?: string;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user