Salesforce Certified Platform Developer II — Question 131
A developer needs to create a Lightning page for entering Order Information. An error message should be displayed if the zip code entered as part of the Order's shipping address is not numeric.
What is a recommended way for the error message be displayed to the end user?
Answer options
- A. Use the apex:message tag to display errors
- B. Use the aura:component tag to display errors
- C. Use the ui:outputText tag to display errors
- D. Use the ui:inputDefaultError tag to display errors
Correct answer: D
Explanation
The correct answer is D because the ui:inputDefaultError tag is specifically designed to display input-related error messages in a user-friendly manner. Options A, B, and C do not specifically cater to input validation errors like the zip code, making them less suitable for this scenario.