Newer Version Available
Field-level Errors
Field-level errors are displayed when an input validation error occurs on the field. Input components in the lightning namespace display a default error message when an error condition is met. For input components in the ui namespace, the framework creates a default error component, ui:inputDefaultError, which provides basic events such as click and mouseover. See Validating Fields for more information.
Alternatively, you can use ui:message for field-level errors by toggling visibility of the message when an error condition is met. See Dynamically Showing or Hiding Markup for more information.
Working with Events
Common events for ui:message include the click and mouseover events. For example, click="{!c.revalidate}" calls the client-side controller action with the function name, revalidate, when a user clicks the error message.