Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Situation:
1) Contact form with a file field that is required and only accepts PDF
2) Uploading a file with another extension
Result
2 error messages :
- The specified file flag_vietnam.png could not be uploaded.
Only files with the following extensions are allowed: pdf doc dox pcs pages odt indd.
- This value should not be null.
See screenshot.
Where is the error message "This value should not be null" is comming from? Is this a setting wrong in my contact form?
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2016-11-30 at 09.48.05.png | 32.45 KB | michiellucas |
Comments
Comment #2
Dinesh18 CreditAttribution: Dinesh18 as a volunteer and at TATA Consultancy Services for Pfizer, Inc. commentedI have tried creating a new field in Contact Form (/admin/structure/contact). I have created a new Contact Form and added a new field with type "File." I am not able to replicate the issue "This value should not be null." It is throwing an error :
The specified file Hello.feature could not be uploaded.
Only files with the following extensions are allowed: txt.
We can add extensions in that particular field type.
Comment #3
SpadXIII CreditAttribution: SpadXIII at ezCompany commentedThis seems to be getting fixed in: https://www.drupal.org/node/2482783