Symfony2: How to translate custom error messages in form types?

后端 未结 4 819
梦谈多话
梦谈多话 2021-02-12 15:41

I need to translate the error messages from my form type. Here is my form Type code:

class ReferFriendType extends AbstractType {

public function buildForm(Form         


        
4条回答
  •  面向向阳花
    2021-02-12 16:01

    Validation translations go to the validators.LANG.yml files — not messages.LANG.yml ones.

提交回复
热议问题