Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Use validation class with strings and not with POST
  • Is it possibile use Validation class with strings without using fieldsets?? I would validate with "valid_string" rule something like :
    public static function create($item)
    {
     $val = \Validation::forge();
     // validate the $item param with ('valid_string', array('alpha', 'numeric', 'dots', 'utf8')
    }
    

    thank you!
  • No, Validation needs to "model" the fields it is validating and that's what the Fieldset class is for. Having said that, there's no reason why your example couldn't work.

Howdy, Stranger!

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

In this Discussion