add (attribute, messages) deprecated
Adds error messages to a given attribute and sends becameInvalid
event to the record.
Example:
if (!user.get('username') { user.get('errors').add('username', 'This field is required'); }
Parameters:
-
attribute
String
-
messages
(Array|String)
Please login to continue.