Adding required validation for Paperclip 4.0.

This works fine with previous versions of paperclip.