AdamWathan\Form\FormBuilder::getError PHP Method

getError() public method

public getError ( $name, $format = null )
    public function getError($name, $format = null)
    {
        if (!isset($this->errorStore)) {
            return null;
        }
        if (!$this->hasError($name)) {
            return '';
        }
        $message = $this->errorStore->getError($name);
        if ($format) {
            $message = str_replace(':message', $message, $format);
        }
        return $message;
    }