File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,15 @@ export function validate (
252
252
}
253
253
return false
254
254
case 'TIME' :
255
+ const isValid = moment ( value , 'HH:mm:ss' , true ) . isValid ( )
256
+ if ( isRequiredButEmpty ) {
257
+ return emptyFieldValidationIssue ( )
258
+ } else if ( ! valueDoesNotExist && ! isValid ) {
259
+ return validationIssue ( 'Field must be valid time' )
260
+ } else {
261
+ return false
262
+ }
263
+
255
264
case 'NUMBER' :
256
265
const isNotANumber = isNaN ( value )
257
266
if ( isRequiredButEmpty ) {
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ export type EditorTables = {
129
129
pickup_message : string ,
130
130
prior_notice_duration_max : number ,
131
131
prior_notice_duration_min : number ,
132
- prior_notice_last_time : number ,
132
+ prior_notice_last_time : time ,
133
133
prior_notice_start_day : number ,
134
134
prior_notice_start_time : number
135
135
} > ,
You can’t perform that action at this time.
0 commit comments