Salesforce Certified Platform Developer II — Question 63

What is the best way to display field-level error messages in Lightning?

Answer options

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.