Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Custom message for Required field does not display

SA-84837

Summary



In a Validate rule, the default Required option is used and a custom message is provided. At runtime, the default message, 'This field may not be blank', displays instead of the custom message.


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a Validate rule.
  2. Add a property and check the Required option.
  3. Provide a message in the Message option.


Root Cause



This behavior is as per Pega product design.

Refer to the below text from the Help document:

You cannot use a validate rule to present a custom error message for the specific case of a user who leaves a required field empty in an input form. In this case, the system presents a standard message "This field may not be blank." (In this case, the Validate tab has the Requiredcheck box selected for that particular property, no additional conditions to satisfy, and at run time the user leaves the field corresponding to that property blank on the input form.) If the validate rule specifies additional conditions (for example, a condition that the input value must be greater than a particular number) and a custom error message, and the user leaves the field blank, the system presents both the standard message and the custom error message because the blank input also fails the additional specified conditions.



Resolution



Perform the following local-change:

To display the custom error message for the Required field, use the function [expression evaluates to true] and  the .property=="".

Published August 15, 2019 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us