简体   繁体   中英

show error message on struts2 jquery dialog box

i have made a simple wepp app in struts2 that logs in and add user the log in and registration page are all running ok..but i had a problem when i registered the same email it was successful i wanted to add a simple error that when the email is already registered it may not be used again to register another user i found a couple of validation but it does not answer my question ideas on how to do this kind of validation is appreciated

this is a similar problem but it has no answer as well http://www.rqna.net/qna/ypywn-how-to-show-error-message-on-struts2-jquery-dialog-box.html

i read this one but i think its a different kind of validation http://struts.apache.org/release/2.2.x/docs/fielderror.html

found a very simple solution to this i just put

addFieldError("email","user email already in use");

and it worked the way i wanted it to work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM