Make business profile address postal code optional.
Allow empty or missing postalCode on profile addresses so saves are not blocked by MinLength validation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
6f2ce12c0f
commit
d237d00f65
@@ -494,7 +494,7 @@ export class BusinessProfileService {
|
||||
province: item.province.trim(),
|
||||
city: item.city.trim(),
|
||||
address: item.address.trim(),
|
||||
postalCode: item.postalCode.trim(),
|
||||
postalCode: item.postalCode?.trim() || null,
|
||||
landline: item.landline?.trim() || null,
|
||||
};
|
||||
|
||||
|
||||
@@ -71,9 +71,10 @@ class BusinessAddressDto {
|
||||
@MinLength(1)
|
||||
address!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MinLength(1)
|
||||
postalCode!: string;
|
||||
@MaxLength(20)
|
||||
postalCode?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
|
||||
Reference in New Issue
Block a user