Customise ActiveModel full_messages

前端 未结 1 473
名媛妹妹
名媛妹妹 2021-01-22 06:50

I would like to remove the attribute from my custom validation messages and just display the message, so instead of

School Please Provide Your School Name


        
相关标签:
1条回答
  • 2021-01-22 07:17

    full_message expects the two arguments attribute and message.

    Update: Avoid monkey patching and edit your locale file to have something like:

    en:
      errors:
        format: "%{message}"
    
    0 讨论(0)
提交回复
热议问题