core/Form.php
public function setError($name, $error)
    {
        if (isset($this->fields[$name])) {
            $this->fields[$name]->error = $error;
        }
    }
public function setError($name, $error)
    {
        if (isset($this->fields[$name])) {
            $this->fields[$name]->error = $error;
        }
    }
设置错误
@param $name
@param $error