ActiveRecord\Errors::size PHP 메소드

size() 공개 메소드

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