Client side validation not working using validate()

前端 未结 3 1620
挽巷
挽巷 2021-01-22 15:36

I am doing validation inside validate() method.

public void validate(){
    if(continent.equals(\"-1\")){
        HttpServletRequest request=ServletActionContext         


        
3条回答
  •  我在风中等你
    2021-01-22 16:19

    actually you shouldn't mix up server side and client side code. validate method can be invoked only in server side... So there is no way to use this method on client side. You need to write your own JS side validation as the same as server side validation.

提交回复
热议问题