Skip to main content
August 23, 2022
Question

issue in default validation for date field

  • August 23, 2022
  • 5 replies
  • 0 views

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
August 23, 2022

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

August 23, 2022

Text Entered as "ABC"

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

peter.lewis
Employee
August 23, 2022

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
August 23, 2022

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
August 23, 2022

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

The Expression Guru