Setting Custom error message with CarrierWave

后端 未结 4 1180
迷失自我
迷失自我 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:20

    Actually it is:

    en:
      errors:
        messages:
          extension_white_list_error: "You are not allowed to upload %{extension} files, allowed types: %{allowed_types}"
    

    Source:

    https://github.com/jnicklas/carrierwave/blob/master/lib/carrierwave/locale/en.yml

提交回复
热议问题