Support Topics Documentation Slack YouTube Blog

"Value does not match the chosen validator" (datetime)

(Jure S) #1

I live in Europe and I suspect that is the reason the datetime validation doesn’t work for us in console.
As you can see I tried both: UTC and 24h time format and without UTC and time below 12h.
All I have to do is try to select the date and time from the presented dialog in console (with datetime validator ON) and I receive the above error.</img></img>

(Sergey Chupov) #2

Hi Jure,

Thank you for pointing this out, it is definitely a bug and we shall discuss probable solutions internally.
But first, why do you need this kind of validator on a datetime column?

(Jure S) #3

I thought it to be a nice additional safety tool for moments when datetime formats go wrong.
The validator already exists there so I thought it would be good to run well.

How I found it:

I am currently changing a few things for my event planner android app that uses date and time options. I am making it Timezone aware as well and while toying a little bit with the console I found this bug.
I remember founding it previously, when I first start developing the app and since I didn’t report it then I thought it would be best to do so now.

(Sergey Chupov) #4

OK, I understand your motivation. It looks like earlier we had more exact predefined validators for datetime columns, like “Date: dd/mm/yy” or “Date: dd/mm/yyyy GMTx” etc., but apparently they were removed (or merged somehow) since it was unreasonable to keep a possibly large list of such formats predefined. Current generic “Date/Time” validator may be ambiguous - it is not clear what exactly it validates and you would actually be terrified if you had seen the regex for that :slight_smile:

Considering that for DATETIME columns the date values are already validated on saving, I believe having a separate “Date/Time” validator is not correct - it is only useful for string-like columns, but we shouldn’t encourage keeping date/time values in such columns. So I think this validator will simply be removed eventually, as a solution.
And in your specific case it’s merely redundant, so I suggest you to safely remove the validator.

(Jure S) #5

Will do. Thank you