Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
problem with special characters in string validation via extended validation class
  • hello everybody, I extended the validation core class to add custom validators. Now when I use this class, fields that contain special characters like "ß" or "ü" won't pass the valid_string rule. The same ruleset, used directly via the validation core class in the controller works perfectly as wished for. Would be great if someone could give me a hint whether I'm missing something out or there might be a bug. example class: <code>
    class TestValidator extends Validation { public function __construct($set) {
    parent::__construct($set); $this->setupValidator();
    } private function setupValidator() {
    $this->add('name')->add_rule('required')->add_rule('valid_string',array('alpha','numeric','spaces','punctuation','dashes'))->add_rule('max_length',255);
    }
    }
    </code> called in the controller like that: <code>
    $this->oCheck = TestValidator::factory();
    if ($this->oCheck->run($_REQUEST)) { }
    </code> With a parameter like "?name=Böhme" the validator never returns "true". Any help would be really appreciated. Thanks & happy easter: jan.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!