Changing Default Item Required Error Message in APEX
In APEX, if a page item is a required value it is no longer necessary to create an explicit validation. Setting the item's option Value Required to Yes will make it a required field as shown below.
If the page is submitted and the item is null, then the page will be reloaded with a validation error message stating that <label> must have some value.</label> The default message can me changed by doing the following:
- Go to Shared Components > Text Messages (under Globalization)
- Create Text Message
When the page is now submitted and the item is null, the page will be reloaded with a validation error message stating that <label> can not be null</label>.
The above technique changes the default message for all items that have their Value Required option set to Yes (i.e. it's an application level setting).
Comments
Join the discussionNo comments yet. Be the first to comment.
