File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,13 @@ export const AddressSchema = z.object({
7070 Location : z . preprocess ( preprocessJSON , LocationCoordinatesSchema . optional ( ) ) ,
7171 OpeningTimes : z . preprocess ( preprocessJSON , z . array ( OpeningTimeSchema ) . default ( [ ] ) ) ,
7272} ) . refine ( ( data ) => {
73- // If not open 24/7 and not appointment only , must have at least one opening time
74- if ( ! data . IsOpen247 && ! data . IsAppointmentOnly ) {
73+ // If not open 24/7, must have at least one opening time
74+ if ( ! data . IsOpen247 ) {
7575 return data . OpeningTimes . length > 0 ;
7676 }
7777 return true ;
7878} , {
79- message : 'At least one opening time is required when location is not open 24/7 and not appointment only ' ,
79+ message : 'At least one opening time is required when location is not open 24/7' ,
8080 path : [ 'OpeningTimes' ]
8181} ) ;
8282
You can’t perform that action at this time.
0 commit comments