• Resolved churious

    (@churious)


    Dear all,

    I am using CF7 (v.5.4.1) on WordPress (v.5.7.2) and have the following issue:

    I have a simple form which includes a file upload field (= required).
    Once I submit without filling out and uploading anything all required fields show up <span class="wpcf7-not-valid-tip" aria-hidden="true">The field is required.</span> in the DOM except the file upload field though it is also marked as required.
    What I also recognized is that all required input fields attributes changed to aria-invalid="true" except the file upload field.

    Here is now my question:
    How does the validation of the file upload field work?
    After submit it will be checked correctly but there are no changes in the DOM visible.

    Thanks in advance for any helpful informations.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Validation for file uploading fields works differently than one for other fields. It runs after it is confirmed that all other fields have a valid value and the submission is not spam. Therefore, when there is an invalid field or an anti-spam module detects spam activities, validation for file uploading fields won’t run.

    See the Contact Form 7 5.4 Beta release announcement for more details.

    Thread Starter churious

    (@churious)

    Thank you for the explanation.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Input type “file” validation?’ is closed to new replies.