Skip to content

Empty rule and the input is CSS class required on submit #84

@spout

Description

@spout

I'm using MeioUpload (branch master) in CakePHP 1.3.10.

Photo isn't required, so I added the validate rule:
'photo' => array('Empty' => array('check' => false))

It works fine, but if I submit the form with no file upload but with other validations errors (on other fields), the file input get a CSS "required" class.
(class="input file required")
echo $this->Form->input('photo', array('type' => 'file'));
This happens only when the form is submitted, no required class without submitting the form.

I tried to put allowEmpty to false, it doesn't works too.

I don't know if it is a bug ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions