Setting Custom error message with CarrierWave

后端 未结 4 1179
迷失自我
迷失自我 2020-12-31 09:26

I have an Image uploading application running on carrierwave which restrict user from uploading image only of desired extensions \'jpg,jpeg,png\' I have put in place the v

4条回答
  •  青春惊慌失措
    2020-12-31 10:17

    for some reason my ActiveModel did not include the validation module from carrierwave upon calling mount_uploader. I had to do include CarrierWave::Validations::ActiveModel in my model to get the integrity validator.

提交回复
热议问题