The mandatory date field was successfully saved after entering an invalid date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
At the dictionary level, “Mandatory = true” is set.
The user entered an invalid date format on the form (e.g., 2025/13/99, a space, or half-width symbols).
After pressing the standard Save button, the record was successfully saved with the field left blank.
The “mandatory check” was not triggered. What is the reason for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
so you are expecting record should not be saved since user gave invalid date with space or some symbol?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Thank you for your reply.
Yes, I think there should be an error displayed under that field, for example, “Invalid Date.”
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @gongyiping ,
Please check if there is any client script or UI policy there to check the date format and validity checks.
After getting saved does it shows the submitted value in correct format or submitted value on that field?
Check the submitted value in logs/history of that record what got submitted.
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Thank you for your reply.
There is no script checking the date format.
From the logs, the submitted value shows the original input, but it becomes blank when saved to the database.
Thanks,
gongyiping
