When I create an image field of type "Image" with CCK and mark it as "Required," it is not marked with class="form-required" in the HTML, and thus does not receive the "*" Required item styling. However, when the field isn't filled in and the form is processed, an error message stating that that field is required is received. In this case the text box doesn't have the red outline styling it should at this point either (because again it doesn't have class="form-required"). This is true whether the image is in a group or not, whether or not multiple values are allowed, and whether or not custom alt and title text is enabled.
Comments
Comment #1
drewish commentednot an image module issue.
Comment #2
abloodworth commentedAny idea which module it would be? I'd be happy to try to fix the problem if I knew where to look...
Comment #3
moshe weitzman commentedit is a core issue. when fapi was introduced, we could not easily make any fields fields required. it has to do with how browsers protect file fields for your security.
Comment #4
abloodworth commentedIn your previous post, did you mean to say "could not easily make any image fields required"? Because this is working fine for non-image fields. This is a major user experience issue; if a field is required, you need to be able to tell a user this up-front, not wait for an error message. I guess the work-around is to somehow indicate this in a customized template for this content type?