Preconditions: content type: textline (required), file (non required, nothing is set in max file size)
Steps - for file field type, but it works the same for image and media
1. Create content item with content type from preconditions
2. Fill the textline and upload a file bigger than 5 MB. Click Publish.
3. Go to admin/content type and edit content type from preconditions: set max file size for file for ex: 1 MB
4. Go to edit mode of content item created in step 2.
5. Edit textline.
6. Click Publish
ezfile field is cleared, validation message is displayed.
File should not be removed, except when user upload a new one. Validation message is OK.