struts validation occurring when page loads instead of on submit

前端 未结 3 963
梦如初夏
梦如初夏 2021-01-23 06:07

Please forgive me; I am sort of new to struts. I am having an issue where my validation is occurring when the page loads instead of when i actually submit my form. I have been

3条回答
  •  广开言路
    2021-01-23 06:30

    The validation runs before the action as specified in the validation file name, regardless of the result. So if you have one action to both display and process the form, then validation will run on that action before displaying and also before processing the form.

    If this is not the behavior you want, move the display/load of the page to a different action.

提交回复
热议问题