/** * Returns value if every character is alphabetic, FALSE * otherwise. * * @param mixed $key * @return mixed * * @tag validator */ function testAlpha($key) { if (!$this->keyExists($key)) { return false; } if (Inspekt::isAlpha($this->_getValue($key))) { return $this->_getValue($key); } return FALSE; }
/** * Descricao : Verifica se o dado do formulario for alfabetico * * @param Field field : Um objeto field * * @return True se o dado for alfa alfabetico */ private function alphabeticValidation($field) { if ($field->getMethod() == "get") { return Inspekt::isAlpha($_GET[$field->getName()]); } else { return Inspekt::isAlpha($_POST[$field->getName()]); } }
/** * Generated from @assert ('_funkatronuser') === false. */ public function testIsAlpha6() { $this->assertSame(false, Inspekt::isAlpha('_funkatronuser')); }
/** * Returns value if every character is alphabetic, FALSE * otherwise. * * @param mixed $key * @return mixed * @throws Exception * @tag validator */ public function testAlpha($key) { $value = $this->getValueOrNull($key); if (!is_null($value) && Inspekt::isAlpha($value)) { return $value; } return false; }