Hello.
Looks like there is a problem when we use 'Validate minimum resolution' option and also set standard image field instance settings related to image resolution constraints.
Steps to reproduce:
1. Set "The resolution to crop the image onto" option
2. Enable "Validate minimum resolution" option
3. Set standard image field instance settings "Minimum image resolution" or "Maximum image resolution" options.
4. Try to load image with resolution that less than allowed or just upload file with size greater than allowed.

This caused because standard function 'file_validate' just merges result of each #upload_validator callbacks into the common array and it doesn't used array_unique function (and it shouldn't use it because problem is on the module side). So if we want to validate these situations manually, we should unset standard validation callbacks. So here is patch which solves this problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Shlyapkin Grigoriy created an issue. See original summary.

sumthief’s picture

Patches #1 and #2 was incorrect, so reworked version.

sumthief’s picture