location must now only be state
This commit is contained in:
@@ -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'],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user