Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Validating POST request fields grouped as array
  • If i where to submit a form using POST request with this fields: <code>
    <input type="text" name="user[name]"/>
    <input type="text" name="user[pass]"/>
    </code>I would get an array, how could i validate the actual fields using the Validation class?.
  • You have to create the fields in the Controller too, so that it'll look for them when the data is posted.
    $val->add_field('username', 'Your username', 'required');
    

    http://docs.fuelphp.com/classes/validation/validation.html Good luck!

Howdy, Stranger!

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

In this Discussion