@@ -5,6 +5,7 @@ import {
|
||||
IsNotEmpty,
|
||||
IsOptional,
|
||||
IsPhoneNumber,
|
||||
IsPositive,
|
||||
IsString,
|
||||
} from "class-validator";
|
||||
import { Address } from "./Address";
|
||||
@@ -36,7 +37,7 @@ export class GroupContact {
|
||||
* The contact's middle name.
|
||||
* Optional
|
||||
*/
|
||||
@Column()
|
||||
@Column({nullable: true})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
middlename?: string;
|
||||
@@ -45,7 +46,7 @@ export class GroupContact {
|
||||
* The contact's last name.
|
||||
*/
|
||||
@Column()
|
||||
@IsOptional()
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
lastname: string;
|
||||
|
||||
@@ -61,7 +62,7 @@ export class GroupContact {
|
||||
* The contact's phone number.
|
||||
* Optional
|
||||
*/
|
||||
@Column()
|
||||
@Column({nullable: true})
|
||||
@IsOptional()
|
||||
@IsPhoneNumber("DE")
|
||||
phone?: string;
|
||||
@@ -70,7 +71,7 @@ export class GroupContact {
|
||||
* The contact's email address.
|
||||
* Optional
|
||||
*/
|
||||
@Column()
|
||||
@Column({nullable: true})
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
email?: string;
|
||||
|
||||
Reference in New Issue
Block a user