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(),
|
province: item.province.trim(),
|
||||||
city: item.city.trim(),
|
city: item.city.trim(),
|
||||||
address: item.address.trim(),
|
address: item.address.trim(),
|
||||||
postalCode: item.postalCode.trim(),
|
postalCode: item.postalCode?.trim() || null,
|
||||||
landline: item.landline?.trim() || null,
|
landline: item.landline?.trim() || null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -71,9 +71,10 @@ class BusinessAddressDto {
|
|||||||
@MinLength(1)
|
@MinLength(1)
|
||||||
address!: string;
|
address!: string;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
@MinLength(1)
|
@MaxLength(20)
|
||||||
postalCode!: string;
|
postalCode?: string | null;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
|
|||||||
Reference in New Issue
Block a user