update message component, bugfixes
This commit is contained in:
@@ -114,7 +114,7 @@ const phoneRegex = /^\+1 \(\d{3}\) \d{3}-\d{4}$/;
|
||||
|
||||
export const UserSchema = z
|
||||
.object({
|
||||
id: z.string().uuid(),
|
||||
id: z.string().uuid().optional().nullable(),
|
||||
firstname: z.string().min(2, { message: 'First name must contain at least 2 characters' }),
|
||||
lastname: z.string().min(2, { message: 'Last name must contain at least 2 characters' }),
|
||||
email: z.string().email({ message: 'Invalid email address' }),
|
||||
@@ -202,7 +202,7 @@ export type LicensedIn = z.infer<typeof LicensedInSchema>;
|
||||
export type User = z.infer<typeof UserSchema>;
|
||||
|
||||
export const BusinessListingSchema = z.object({
|
||||
id: z.string().uuid().optional(),
|
||||
id: z.string().uuid().optional().nullable(),
|
||||
email: z.string().email(),
|
||||
type: z.string().refine(val => TypeEnum.safeParse(val).success, {
|
||||
message: 'Invalid type. Must be one of: ' + TypeEnum.options.join(', '),
|
||||
@@ -243,8 +243,8 @@ export type BusinessListing = z.infer<typeof BusinessListingSchema>;
|
||||
|
||||
export const CommercialPropertyListingSchema = z
|
||||
.object({
|
||||
id: z.string().uuid().optional(),
|
||||
serialId: z.number().int().positive().optional(),
|
||||
id: z.string().uuid().optional().nullable(),
|
||||
serialId: z.number().int().positive().optional().nullable(),
|
||||
email: z.string().email(),
|
||||
//type: PropertyTypeEnum.optional(),
|
||||
type: z.string().refine(val => PropertyTypeEnum.safeParse(val).success, {
|
||||
|
||||
Reference in New Issue
Block a user