Implemented the getter for loading the postalcodelocale from env
ref #43
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { IsNotEmpty, IsOptional, IsPostalCode, IsString } from 'class-validator';
|
||||
import { config } from '../../config';
|
||||
import { Address } from '../entities/Address';
|
||||
|
||||
/**
|
||||
@@ -35,7 +36,7 @@ export class CreateAddress {
|
||||
*/
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@IsPostalCode("DE")
|
||||
@IsPostalCode(config.postalcode_validation_countrycode)
|
||||
postalcode: string;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user