Input Default Error (Deprecated)
ui:inputDefaultError
Deprecated as of API version 47.0. We recommend migrating to Lightning Web Components and using the lightning-input component.
For Use In
Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App
We recommend using Lightning Web Components whenever possible. When migrating to Lightning Web Components, use lightning-input with built-in field validation.
For more information, see Aura Components in the ui Namespace Are Deprecated.
ui:inputDefaultError is the default error handling for your input components. This component displays as a list of errors below the field. Field-level error messages can be added using set("v.errors"). You can use the error atribute to show the error message. For example, this component validates if the input is a number.
This client-side controller displays an error if the input is not a number.
Alternatively, you can provide your own ui:inputDefaultError component. This example returns an error message if the warnings attribute contains any messages.
This client-side controller diplays an error by adding a string to the warnings attribute.
To create forms for Salesforce objects without using Apex controllers, use lightning:inputField with lightning:recordEditForm, or use lightning:recordForm. To create an input field for different data types, use lightning:input.