You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to ajv-formats documentation, "date-time" format specify that time-zone is mandatory. Unfortunately since full validation mode format has been added, it seems that time-zone is not mandatory anymore:
importajvFormatsfrom"ajv-formats"constdateWithoutTimeZone='2022-07-06T13:12:43';constdateWithTimeZone='2022-07-06T13:12:43Z';// validation with new full format mode does not work as expectedconsole.log(ajvFormats.get("date-time").validate(dateWithoutTimeZone))// true => should return falseconsole.log(ajvFormats.get("date-time").validate(dateWithTimeZone))// true => ok// validation with fast format mode is okconsole.log(newRegExp(ajvFormats.get("date-time","fast").validate).test(dateWithoutTimeZone))// false => okconsole.log(newRegExp(ajvFormats.get("date-time","fast").validate).test(dateWithTimeZone))// true => ok
The text was updated successfully, but these errors were encountered:
According to ajv-formats documentation, "date-time" format specify that time-zone is mandatory. Unfortunately since full validation mode format has been added, it seems that time-zone is not mandatory anymore:
The text was updated successfully, but these errors were encountered: