You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The form should be successfully validated and the message sent.
Actuel outcome
There is a validation issue on the attachment field with the following message: Please upload a file.
Environment
Craft version: 3.9.10
contact-form plugin version: 2.5.2
Analysis
In this line, the $submission->attachment property is set to an array. The Yii file validator receives this array in its validateValue($value) method. This method checks that its $value parameter is an instance of \yii\web\UploadedFile which fails because it's actually an array.
The text was updated successfully, but these errors were encountered:
When using the Yii file validator on a single file attachment field, the validator always returns an error indicating that no file was uploaded.
Steps to reproduce
attachment
field:attachment
field:Expected outcome
The form should be successfully validated and the message sent.
Actuel outcome
There is a validation issue on the
attachment
field with the following message:Please upload a file.
Environment
Analysis
In this line, the
$submission->attachment
property is set to an array. The Yii file validator receives this array in itsvalidateValue($value)
method. This method checks that its$value
parameter is an instance of\yii\web\UploadedFile
which fails because it's actually an array.The text was updated successfully, but these errors were encountered: