Salesforce Certified Platform Developer II — Question 63
What is the best way to display field-level error messages in Lightning?
Answer options
- A. ui:inputDefaultError
- B. ui:outputText
- C. aura:component
- D. apex:message
Correct answer: A
Explanation
The correct answer, ui:inputDefaultError, is specifically designed to show field-level error messages in Lightning components. The other options, such as ui:outputText and aura:component, do not provide the same functionality for error display, while apex:message is used for displaying general messages rather than field-specific errors.