ActiveRecord\Errors::size PHP Method

size() public method

Returns the number of error messages there are.
public size ( ) : integer
return integer
    public function size()
    {
        if ($this->is_empty()) {
            return 0;
        }
        $count = 0;
        foreach ($this->errors as $attribute => $error) {
            $count += count($error);
        }
        return $count;
    }