How can I validate two fields like password and conformPassword in Struts 2?

前端 未结 3 961
挽巷
挽巷 2020-12-18 10:30

I am doing web application in that I want to validate two fields in the JSP form. In registration filed I have so many fields.In that I want to validate password and conform

3条回答
  •  悲哀的现实
    2020-12-18 11:00

    You can use if statement to compare

    if(password == conformPassword)
    {
        //TO-DO
    }
    else
    {
        //TO-DO
    }
    

提交回复
热议问题