Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Does Validation work with Array fields in a form?
  • For example, I have a form with an input that looks like: <input name="quote[email]" ... And I have a validation rule that looks like: $val = Validation::forge();
    $val->add('quote.email', 'E-mail')->add_rule('required')->add_rule('valid_email'); The validation doesn't seem to recognize the field if I have the name set up as an array. It works if I use a non-array field name, but I would very much like to get this working. Any insight is appreciated.
  • Is there more information I can provide or just nobody has any experience with this problem?
  • I haven't used it, but what I understand from people who did, "quote.email" should work fine.
  • I managed to get this working despite not doing anything different than I did before. I must have made a typo or something.... Otherwise no idea why it wasn't working, but now works fine.
  • Maybe did a version update? This was added in v1.1 if I remember correctly.

Howdy, Stranger!

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

In this Discussion