Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Bug with file validation?
  • This fails validation if an uploaded file is present. The validation rule:
    $val->add_field('design_file', '"File for Upload"', 'required'); From the view:
    <?php
    echo Form::label('File for Upload', 'design_file');
    echo Form::input(array('type' => 'file', 'name' => 'design_file'));
    ?> Am I doing something wrong or is this a bug?
  • I don't think you can validated an form field of type 'file', as it will not be part of $_POST, it will be part of $_FILES. Use the Upload class to validate and process uploaded files.

Howdy, Stranger!

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

In this Discussion