Please help me to make validation for maximum width and height of image. I have tried like this.
validates :picture, dimensions: { width: 612, height: 792 }
But I got Unknown validator: 'DimensionsValidator' message.
Kind Regards.
确保已将gem'paperclip gem 'paperclip-dimension-validator'
到Gemfile中
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.