Skip to content

Commit e66922b

Browse files
committed
.
1 parent 8ad8496 commit e66922b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/middleware/validation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ValidationError } from '../utils/errors';
55
// Validation schemas
66
export const schemas = {
77
validateLocation: Joi.object({
8-
streetAddress: Joi.string().min(1).max(200).required(),
8+
streetAddress: Joi.string().min(1).max(200),
99
city: Joi.string().min(1).max(100),
1010
state: Joi.string().length(2).uppercase(),
1111
zipCode: Joi.string().pattern(/^\d{5}(-\d{4})?$/),
@@ -18,7 +18,7 @@ export const schemas = {
1818
unformattedAddress: Joi.string().max(500),
1919
latitude: Joi.number().min(-90).max(90),
2020
longitude: Joi.number().min(-180).max(180),
21-
}).or('city', 'zipCode', 'geo'), // At least one required - now accepting coordinates as alternative
21+
}).or('streetAddress', 'city', 'zipCode', 'geo'), // At least one required - streetAddress, city, zipCode, or geo
2222

2323
coordinates: Joi.object({
2424
lat: Joi.number().min(18).max(72).required(), // US territory bounds

0 commit comments

Comments
 (0)