Skip to main content
Participating Frequently
Aug 23, 2022 11:14 AM UTC
Question

issue in default validation for date field

Hi All,

We are working on some requirement where on the UI side using a date field.

when ever we select a date from the calendar everything is working fine. 

but when we manually type a random text in the date field its throwing below error.

The value XXXXX is not a valid date. Valid format is mm/dd/yyyy.

The actual date format is dd/mm/yyyy but in the validation message it says mm/dd/yyyy

kindly let me know if we can edit or change the above validation message to dd/mm/yyyy

Thanks 

5 replies

vikashk739
Inspiring
Aug 23, 2022 11:34 AM UTC

Hi Swetha, share the error message and the value which is entered

Participating Frequently
Aug 23, 2022 11:36 AM UTC

Text Entered as "ABC"

Error message : The value ABC is not a valid date. Valid format is mm/dd/yyyy.

peter.lewis
Employee
Aug 23, 2022 1:16 PM UTC

If your locale is not en_US and the validation is showing the message that it must be "mm/dd/yyyy" then this sounds like a bug. I'd suggest opening a support ticket.

mikes0011
Brainy
Aug 23, 2022 6:52 PM UTC

I can reproduce this.

On my Community Edition site, I changed my locale to EN_GB, and spun up a simple interface containing just a date field.

As you can see, the placeholder text is correct (dd/mm/yyyy) :

However the validation text for invalid text entry uses the wrong format (mm/dd/yyyy), as Swetha has already advised above:

The Expression Guru
mikes0011
Brainy
Aug 23, 2022 7:09 PM UTC

Interestingly, this disagreement does NOT seem to occur when locale is set to Mexican Spanish (for one among many potential examples)...

The Expression Guru