problem in multiple validation.xml for single action in struts2 -


I am working on struts2 application. I have a jsp page with 3 text fields and I have action-verification. Validating each field through XML file. Now I want to verify if the verification fails in the first field, then it should not check the other two files and the results should go directly to the JSP page (ASS) and if the verification does not fail in the first field It needs to check the remaining files, the second and the third file-UL and now if the verification fails here, it results in the error message going directly to the jsp page (called BJJSP ). Is this possible? If so, please let me know about it.

I have tried to do it but action-verification. Xml is validating all areas in single shot and error messages for all fields are being shown in JSP page which I have written thanks in advance.

You have a small-circuit your field-valentine

for example

  & lt ;! - Field Vedic for Email field - & gt; & Lt; Area name = "email" & gt; & Lt; Field-verifier type = "required" short-circuit = "true" & gt; & Lt; Message & gt; You must enter a value for the email. & Lt; / Message & gt; & Lt; / Region-verifier & gt; & Lt; Area-recognizer type = "email" short circuit = "true" & gt; & Lt; Message & gt; Not a valid e-mail. & Lt; / Message & gt; & Lt; / Region-verifier & gt; & Lt; / Region & gt; & Lt ;! - Field Validations for Email 2 fields - & gt; & Lt; Area name = "email 2" & gt; & Lt; Field-recognizer type = "required" & gt; & Lt; Message & gt; You must enter a value for Email 2. & Lt; / Message & gt; & Lt; / Region-verifier & gt; & Lt; Area-recognizer type = "email" & gt; & Lt; Message & gt; A valid e-mail 2. & Lt; / Message & gt; & Lt; / Region-verifier & gt; & Lt; / Region & gt;  

If email is empty or not valid, then email 2 will not be valid

"A special validator marked as a short circuit Failure to stop the evaluation of later legalists "


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -