public function valid() { $default = '^[a-zA-Z\\s]+$'; // Reemplaza todas las vocales acentuadas $value = \Kodazzi\Tools\StringProcessor::replaceVowels($this->value); if ($this->pattern) { $default = $this->pattern; } if (preg_match('/' . $default . '/', $value)) { return true; } return false; }
public function valid() { $default = '^[\\w\\s\\/\\-\\_\\&\\;\\#\\.\\,\\?\\¿\\!\\¡\\(\\)\\{\\}]+$'; // Reemplaza todas las vocales acentuadas $value = \Kodazzi\Tools\StringProcessor::replaceVowels($this->value); if ($this->pattern) { $default = $this->pattern; } if (preg_match('/' . $default . '/', $value)) { return true; } return false; }