setCSSClass('file'); } public function generate($parent) { $value = $this->getValue(); $pattern = $this->getParam('pattern'); $size = $this->getParam('size'); $css = $this->getCSSClass(); $st = 'getID()) $st .= 'id="' . self::escapeString($this->getID()) . '" '; if($this->getName()) $st .= 'name="' . self::escapeString($this->getName()) . '" '; if(!empty($size)) $st .= 'size="' . ((int) $size) . '" '; $st .= 'class="' . $css . '" '; if($value !== false) $st .= 'value="' . self::escapeString((string) $value) . '" '; if($this->isRequired()) $st .= ' onblur="validate(\'' . self::escapeString($this->getID()) . '\',\'^.+$\',\'' . $css . '\',\'' . $css . '_error\',true);" '; $st .= '/>'; return array('html' => $st); } }