It's all about the answers!

Ask a question

What would be the regular expression for the Due Date field


Arjun Pande (3313) | asked Apr 13 '16, 6:37 a.m.

Hi,

We are planning to validate a field (Due Date) with the regular expression. We are planning to achieve the functionality where Due Date cannot be lesser than Current Date. It can be equal to or more than Current Date. Can it be achieved by Regular Expression format. If yes, how? Any help is appreciated


Comments
Karthik Krishnan commented Apr 13 '16, 8:26 a.m.

 I guess you also need to consider about the local settings for date validation

One answer



permanent link
Donald Nong (14.4k313) | answered Apr 14 '16, 12:08 a.m.
I don't think Regular Expression is the right approach for the said purpose. Regular Expression can easily validate the format of a date value (actually that's a string). But for your intended goal, you will need to do calculation/comparison of the date value. If you are doing Attribute Customization, you can opt for a Script Based Validator instead.

Your answer


Register or to post your answer.