getErrors() public method
Returns the errors for all attributes or a single attribute. See also:
getFirstErrors()
getFirstError()
public array getErrors ( $attribute = null )$attribute string
Attribute name. Use null to retrieve errors for all attributes. return array
Errors for all attributes or the specified attribute. Empty array is returned if no error. Note that when returning errors for all attributes, the result is a two-dimensional array, like the following: [
'username' =&