Closed (fixed)
Project:
Field Validation
Version:
7.x-2.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2013 at 19:49 UTC
Updated:
25 Jun 2013 at 08:40 UTC
The 'required field' validation rule for an image column fails regardless of whether or not an image has been uploaded. The desired behavior is that image columns should only be required if an image has been uploaded. This issue affects all image columns: fid, alt, title, width, height.
Steps to reproduce:
Validation will fail. The node cannot be saved. This same issue manifests itself on multi-value image fields. In this case, a node can never be saved.
My specific use case is the client wishes to require alt text on images.
Comments
Comment #1
g089h515r806 commentedYou could use PHP code validator, and using following code:
Or you could write your own validator.
Comment #2
g089h515r806 commentedchange it to feature request.
Comment #3
chris burge commentedProvided PHP validation rule works like a charm. Thanks!
Comment #4
g089h515r806 commented