Question

Accenture
SG
Last activity: 9 Nov 2022 2:14 EST
Write my own custom message for isFutureDay
Hello
i have a situation where i dont want the user to know the behind of what value is what etc
Invalid value specified for EffectiveDate. Value doesn't adhere to the Validate: IsFutureDate i would like to change this message to my own one i believe i have to write a java to state my error message ? this is my java script that call the effective date to let the user know if pass date it will result in an error message, how can write a error message on my java so that it be using mine that the default one ?
if (theValue.trim().length() == 0) { return false; } java.util.Date theDate = tools.getDateTimeUtils().parseDateTimeString(theValue); java.util.Date presentDate= new java.util.Date();
// return (theDate != null && ! theDate.before(new java.util.Date()) ); return (theDate != null && (theDate.getDate()==presentDate.getDate() || theDate.after(new java.util.Date()))); i have follow this and is working well
support.pega.com/question/how-customize-error-message-validation