Questions tagged [struts-validation]

Use this tag for questions related to validation of data for struts.

Struts Framework provides the functionality to validate the form data. It can be use to validate the data on the users browser i.e. client side as well as on the server side.

For Server side validation of form we can sub class any FormBean with DynaValidatorForm class and for client side validation we can do it using validation-rules.xml with javascript functions enclosed.

146 questions
0
votes
1 answer

struts2 validation invoking xml

i have a login-validation.xml which define some basic field validation rules. however that's not enough for me. i need to do some more database lookup and i consider this as part of my validation logic. how can i do both xml validation and my…
Calvin Lee
  • 97
  • 1
  • 7
0
votes
3 answers

The content of element type "formset" must match "(constant*,form+)"

I am getting error as The content of element type "formset" must match "(constant*,form+)" while I am executing my struts application it will give error as below: 2013-09-27 15:22:35 ERROR org.apache.commons.digester.Digester - Parse Error at…
0
votes
0 answers

comparing values on keyup of textbox Struts 2 java script validation

I am using Struts 2 java web app.and newbie in javascript. In the jsp page the scenario is like this
0
votes
0 answers

Apache Struts and DynaValidatorActionForm on same page

I'm Using two Actions in Apache Struts, one is DisplayAddPerson which forwards to AddPerson Action which uses a DynaValidatorActionForm to show a form page, on submit the data is persisted and ShowPersons Action is called.
dendini
  • 3,842
  • 9
  • 37
  • 74
0
votes
1 answer

Struts Error Message not getting Displayed in UI

I am using Struts 1.2 for my application. I have a validate method for my form where I am doing some validation for the inputs provided by the user. Below is the code for the userName provided by the user: @Override public ActionErrors…
user182944
  • 7,897
  • 33
  • 108
  • 174
0
votes
1 answer

Struts 1.3 not able to validate using xml ValidatorForm

I am making simple login page and trying to validate it using struts ValidatorForm but its not working. But same code worked for DynaValidatorForm. Not able to understand what's problem. It is not showing any error when I click login button. Here is…
sambot
  • 63
  • 1
  • 2
  • 9
0
votes
0 answers

Remove Default Action validation

I am using Struts validation by extending action to ActionSupport. When I try to put special character on the UI, then default actionErrors are adding up in the collections like Illegal characters were detected in the input, please remove them and…
ankit
  • 438
  • 10
  • 26
0
votes
2 answers

Should I find and copy struts styles and javascripts to the /struts/ folder enable client-side validation?

Client-side validation doesn't work for me. First I thought that it is a myeclipse fault that doesn't copy them to the root folder but then I discovered the js and css files reside in the struts core jar. Now I wonder what I should do! Should if I…
Johnny
  • 1,509
  • 5
  • 25
  • 38
0
votes
1 answer

How to disable struts 2 validation before form submission?

I'm doing a project with struts2, Hibernate. I want struts to validate my form. I have added a MyAction-validation.xml and it works fairly well. (I say fairly well because it doesn't validate on the client side. I have set the validate attribute of…
Johnny
  • 1,509
  • 5
  • 25
  • 38
0
votes
1 answer

Forward call to Action class when validation fails

I'm working on struts 1.1 application. I have added validation for JSP form page(i.e. adduser.jsp). It get validated after clicking on add button. And my validation in "Validator-XSS.xml" working fine. But when validation fails then it forward to…
Rahul P
  • 1,065
  • 3
  • 17
  • 32
0
votes
0 answers

Struts 2 Xml validation: One set of validation on multiple fields

I have lots of number field let say num1, num2 ... Now I am looking for way I can apply a set of validation on all field rather than writing same validations multiple times. Here is set of two validation for requiredString and Number…
Anoop
  • 456
  • 3
  • 5
  • 15
0
votes
1 answer

excludemethod in validation interceptor is not working in strut 2

I am new to struct 2.0. I am trying to run my first small apllication with interceptor and want to use validation for only excecute method. But it call validate function before both populate and excecute method. Can anyone please tell me what i am…
0
votes
1 answer

Struts Validation Framework: Validation Summary is blank

BACKGROUND I am learning Struts 1.x and currently on the validation framework. PROBLEM I have it in a semi-working condition. Currently it is showing the validation errors, but in a javascript alert.. and then the validation summary (the thing…
Matt
  • 6,787
  • 11
  • 65
  • 112
0
votes
1 answer

dynamic field name for field validator in struts2

i have this Class public Class Employee { String name; List
listOfAddress; } public Class Address { String location; String streetName; } in my JSP page i have filled like this
user1512999
  • 237
  • 2
  • 6
  • 19
0
votes
1 answer

how to write superscripts(like squares,powers) in struts 1.3 properties file?

i have a requirement to print units like m(square) in front end. So, for this i have to mention in properties file. But properties file is not accepting to write like that. Please help me.
sandy
  • 3
  • 1
  • 6
1 2 3
9
10