ActiveRecord\Errors::__get PHP Method

__get() public method

Retrieve error messages for an attribute.
public __get ( string $attribute ) : array
$attribute string Name of an attribute on the model
return array or null if there is no error.
    public function __get($attribute)
    {
        if (!isset($this->errors[$attribute])) {
            return null;
        }
        return $this->errors[$attribute];
    }