Regla letras: analiza si un string contiene sólo letras y vocales con acento
-Si no es cargada no se controla
@param string $name
@param mixed $value
@return boolean
13150
protected function letters ($name, $value){
        //Si no se completo no se valida
        if(! $this->isComplete($value)){
            return TRUE;
        }
    	$expresion = '/^[a-zA-Záéíóúñ\s]*$/';
    	if(! preg_match($expresion, $value)){
            $this->add_message($name, 'letters');
            return FALSE;
    	}
        return TRUE;
    }
666501
private function validate(string $name, $value): bool
    {
        if (! isset($this->validators[$name])) {
            return true;
        }

        $errors = [];

        $isValid = true;
        foreach ($this->validators[$name] as $validator) {
            if (! $validator->is_valid($value)) {
                $errors = array_merge($errors, $validator->get_error_messages());
                $isValid = false;
            }
        }

        $element = $this->element($name);
        if ($element instanceof ErrorAwareInterface) {
            $element->withErrors($errors);
        }

        return $isValid;
    }
1207065
public function is_extension($name, $value, $extensions){
        if(! $this->not_empty($name, $value)){
            return TRUE;
        }
        $extensions= explode(',', $extensions);
        $ok= TRUE;
        if($this->isMultiple($value)){
            foreach ($value['name'] as $name) {
                $ext = pathinfo($name, PATHINFO_EXTENSION);
                if (in_array($ext, $extensions)){
                    $ok= FALSE;
                    break;
                }
            }
        }else{
            $ext = pathinfo($value['name'], PATHINFO_EXTENSION);
            $ok= (in_array($ext, $extensions));
        }        
        
        if($ok){
            return TRUE;
        }else{
            $this->add_message($name, 'is_extension', array('extensions' => $extensions));
            return FALSE;
        }
    }
326472
public static function set_merge($name, $value=null){
        if(is_array($name)) {
            self::$o->config = array_merge(self::$o->config,$name);
        }
        else {
            self::$o->config[$name] = array_merge(self::$o->config[$name],$value);
        }
        return true;
    }
905075
public function set($name, $value)
    {
        $this->instance->unlock();
        $result = $this->instance->set($name, $value);
        $this->instance->lock();

        return $result;
    }
373613
public function config($name, $value = null) {
        if (is_array($name)) {
            $this->config = array_merge($this->config, $name);
        }
        elseif (is_null($value)) {
            return isset($this->config[$name]) ? $this->config[$name] : null;
        }
        else {
            $this->config[$name] = $value;
        }
    }
658121
public function setProperty(string $name, $value)
    {
        if (isset($this->properties[$name])) {
            $this->properties[$name] = $value;
            return true;
        }

        return false;
    }
245090
protected function max_length($name, $value, $max){
        //Si no se completo no se valida
        if(! $this->isComplete($value)){
            return TRUE;
        }
        if(is_string($value) || strval($value)){
            if(strlen($value) > $max){
                $this->add_message($name, 'max_length', array('max' => $max));
                return FALSE;
            }
        }else{
            $this->add_message($name, 'is_string');
            return FALSE;
        }
        return TRUE;
    }
414771
public static function set($name, $value)
    {
        $model = self::find()->where([self::getNameAttribute() => $name])->one();
    
        if ($model) {
            return (bool) $model->updateAttributes([
                self::getValueAttribute() => $value,
            ]);
        }
    
        $model = new self();
        $model->value = $value;
        $model->name = $name;
        return $model->save();
    }
978123
public static function set(string $name, $value)
    {
        $names = Imi::parseDotRule($name);
        if (isset($names[0]))
        {
            $first = array_shift($names);
            if(isset(static::$configs[$first]))
            {
                return static::$configs[$first]->setVal($names, $value);
            }
            else
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }
889144
public static function verifyNonce($name, $value)
    {
        return isset($_POST[$name]) && wp_verify_nonce($_POST[$name], $value);
    }
875690
public function set(string $name, string $value)
    {
        $this->values[$name] = $value;
        return $this;
    }
1322264
private function filter(string $name, $value)
    {
        if (! isset($this->filters[$name])) {
            return $value;
        }

        return array_reduce(
            $this->filters[$name],
            function ($value, FilterInterface $filter) {
                return $filter->filter($value);
            },
            $value
        );
    }
551889
public function holder($name = null, $value = null) {
        if ($name === null && $value === null) {
            return $this->holders[ 'default' ];
        }
        if ($value === null) {
            $value = $name;
            $name = 'default';
        }
        $this->holders[ $name ] = $value;
        return null;
    }
210647
public function validateCondition(string $name, $value)
    {
        foreach ($this->validations as $validation) {
            $success = true;
            list($condition, $conditionValue) = $validation;
            $conditionValue = is_array($conditionValue) ? implode(';', $conditionValue) : $conditionValue;

            switch ($condition) {
                case 'gte':
                    if ($value < $conditionValue) {
                        $success = false;
                    }
                    break;

                case 'gt':
                    if ($value <= $conditionValue) {
                        $success = false;
                    }
                    break;

                case 'lte':
                    if ($value > $conditionValue) {
                        $success = false;
                    }
                    break;

                case 'lt':
                    if ($value >= $conditionValue) {
                        $success = false;
                    }
                    break;

                case 'in':
                    $allValues = strpos($this->getType(), '[]') !== false ? $value : [$value];

                    $conditionValue = is_array($conditionValue) ? $conditionValue : [$conditionValue];

                    foreach ($allValues as $currentValue) {
                        if (!in_array($currentValue, $conditionValue)) {
                            $success = false;
                        }
                    }

                    break;

                case 'isip':
                    $isValid = Ip::isValid();
                    $success = ($isValid && $conditionValue == 'true') || (!$isValid && $conditionValue == 'false');
                    break;

                default:
                    throw new \Exception(sprintf(
                        "Invalid condition parameters '%s: %s' for parameter '%s' with value '%s'",
                        $condition,
                        $conditionValue,
                        $name,
                        $value
                    ));
                    break;
            }

            if (!$success) {
                $value = is_array($value) ? json_encode($value) : $value;
                throw new ResponseCode(sprintf(
                    "Invalid conditions for parameter '%s' with value '%s' for condition '%s : %s'",
                    $name,
                    $value,
                    $condition,
                    is_array($conditionValue) ? json_encode($conditionValue) : $conditionValue
                ), 422);
            }
        }

        return $value;
    }
771086
public function string($value)
    {
        if ($this->notBeEmpty($value)) {
            if (is_string($value) && preg_match('/[A-Za-z]+/i', $value)) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
674680
public function set($name, $value)
    {
        if (!$this->isLocked()) {
            $_SESSION[$this->publicStorage]['store'][$this->_namespaceName][$name] = $value;
            return true;
        }
        return false;
    }