Symfony2 - Dynamic form choices - validation remove

前端 未结 5 1081
挽巷
挽巷 2021-01-02 00:28

I have a drop down form element. Initially it starts out empty but it is populated with values via javascript after the user has made some interactions. Thats all working

5条回答
  •  无人及你
    2021-01-02 00:56

    The validation is handled by the Validator component: http://symfony.com/doc/current/book/validation.html.

    The required option in the Form layer is used to control the HTML5 required attribute, so it won't change anything for you, and that is normal.

    What you should do here is to configure the Validation layer according to the documentation linked above.

提交回复
热议问题