public function render() { $this->attributes['type'] = 'url'; // URL type $this->validation[] = new \PFBC\Validation\Url(); parent::render(); }
public function render() { $this->attributes['type'] = 'number'; // Number Type $this->validation[] = new \PFBC\Validation\Numeric(); parent::render(); }
public function render() { $this->_attributes["pattern"] = "#[a-g0-9]{6}"; $this->_attributes["title"] = "6-digit hexidecimal color (e.g. #000000)"; $this->validation[] = new \PFBC\Validation\RegExp("/" . $this->_attributes["pattern"] . "/", "Error: The %element% field must contain a " . $this->_attributes["title"]); parent::render(); }
public function render() { $this->attributes['type'] = 'email'; // Email Type $this->validation[] = new \PFBC\Validation\Email(); parent::render(); echo '<script src="' . (new \PFBC\Form())->getResourcesPath() . PH7_SH . PH7_JS . 'jquery/mailcheck.js"></script><script src=' . PH7_RELATIVE . 'asset/js/mailcheck.js></script>'; }
public function render() { $this->attributes['type'] = 'search'; // Search type $this->attributes['x-webkit-speech'] = 'x-webkit-speech'; // Voice search (only for Webkit engine) parent::render(); }
public function render() { $this->validation[] = new \PFBC\Validation\Date(); parent::render(); }
public function render() { $this->validation[] = new \PFBC\Validation\RegExp("/" . $this->_attributes["pattern"] . "/", "Error: The %element% field must match the following date format: " . $this->_attributes["title"]); parent::render(); }
public function render() { $this->attributes['type'] = 'search'; // Search type parent::render(); }