Merge branch 'dev' into feature/40-pw_reset
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
2020-12-22 16:05:27 +01:00
6 changed files with 35 additions and 8 deletions

View File

@@ -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;
/**

View File

@@ -6,6 +6,7 @@ import {
IsString
} from "class-validator";
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { config } from '../../config';
import { Participant } from "./Participant";
import { RunnerOrganisation } from "./RunnerOrganisation";
@@ -52,12 +53,11 @@ export class Address {
/**
* The address's postal code.
* This will get checked against the postal code syntax for the configured country.
* TODO: Implement the config option.
*/
@Column()
@IsString()
@IsNotEmpty()
@IsPostalCode("DE")
@IsPostalCode(config.postalcode_validation_countrycode)
postalcode: string;
/**