Spring MVC Controller, how to keep BindingResult errors, while emptying the form values

前端 未结 2 1837
感动是毒
感动是毒 2021-02-10 05:41

I have a web form, using Spring MVC Controller. The form is validated by Spring. When there are validation errors, Spring shows the same form, pre-filled in with the values ente

2条回答
  •  广开言路
    2021-02-10 06:40

    The simplest solution I can think of is to not use the tags. Instead use a standard tag.

    For example:

    
        Username: 
    Password:

    In the above example the password field will remain blank at all times while still showing the validation error.

提交回复
热议问题