location must now only be state

This commit is contained in:
2025-09-16 16:11:47 -05:00
parent 571cfb0e61
commit f9d4506bde
3 changed files with 11 additions and 4 deletions

View File

@@ -153,10 +153,10 @@ export const GeoSchema = z
zipCode: z.number().optional().nullable(),
})
.superRefine((data, ctx) => {
if (!data.name && !data.county) {
if (!data.state) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: 'You need to select either a city or a county',
message: 'You need to select at least a state',
path: ['name'],
});
}