Closed pepebe closed 5 years ago
I think this issue is related to #7873
Thanks for mentioning this. I'm not sure if this is really related. As far as I understand the problem, the error message is not dependent on a resource being saved or not, because the js validation kicks in as soon as you move away from the date TV. Nevertheless, I'll do some more test. Can't hurt :).
This is not a bug as presented.
The allow blank functionality is essentially an !empty() check. Bad data or not is still data.
You may want to see if you have set a default value or if the widget show has a default value.
Still huge problem in 2.7.0. Resources with empty date TVs can be saved without any error/warning although allowBlank
is set to false
.
Just created a date tv on a virgin modx install (revo2.2.3) on modxcloud.
If I set "allow blank" for a date TV to "No", it is possible to save the resource even though date and time fields are empty. Tabbing to the next TV is also possible without triggering an error.
Any invalid value entered into the datefield (foo) triggers an error.
On the other hand If I create a text TV and set "allow blank" to "No" and leave the field empty, then I'm prevented from saving the resource and I get an error message:
This is also caused moving the focus away from the text TV.
I've checked date.tpl, but I can't see anything unusual:
revolution/manager/templates/default/element/tv/renders/input/date.tpl
I can verify this behaviour in the latest versions of FF and Chrome, so I don't think this is a browser problem.
Cheers,
pepebe