Hello,
in my data object i need validate image dimensions before uploading.
So i created custom upload validator and it works fine, but i really don't know, how can i propagate my error messages back to upload form.
I'm using ImageField in data object popup form, here is simplified code of image field definition:
$imgField = new ImageField('Image');
$imgField->setValidator(new Custom_ImageValidator());
If i'm uploading image, that is not valid, form (upload iframe) is redirected back because:
https://github.com/silverstripe/sapphire/blob/2.4/forms/FileIFrameField.php#L181
but without error message, how can i show these messages?