validations in struts



Share on Google+Share on Google+

validations in struts
1 Answer(s)      8 years ago
Posted in : Struts
View Answers

November 11, 2008 at 12:02 AM

Hi friend,

<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
<field name="bar">
<field-validator type="required">
<message>You must enter a value for bar.</message>
<field-validator type="int">
<param name="min">6</param>
<param name="max">10</param>
<message>bar must be between ${min} and ${max}, current value is ${bar}.</message>
<field name="bar2">
<field-validator type="regex">
<param name="expression">[0-9],[0-9]</param>
<message>The value of bar2 must be in the format "x, y", where x and y are between 0 and 9</message>
<field name="date">
<field-validator type="date">
<param name="min">12/22/2002</param>
<param name="max">12/25/2002</param>
<message>The date must be between 12-22-2002 and 12-25-2002.</message>
<field name="foo">
<field-validator type="int">
<param name="min">0</param>
<param name="max">100</param>
<message key="foo.range">Could not find foo.range!</message>
<validator type="expression">
<param name="expression">foo lt bar </param>
<message>Foo must be greater than Bar. Foo = ${foo}, Bar = ${bar}.</message>


Visit for more information.



Related Tutorials/Questions & Answers:
validations - Struts
validations  log in page with validations user name must be special character and one number and remining is alphabetes in struts
struts validations - Struts
struts validations  hi friends i an getting an error in tomcat while running the application in struts validations the error in server... --------------------------------- Visit for more information.
Struts validations
Struts validations  Can you please provide the login page example in struts1.x and struts 2.x Where the login page should interact with the DB. the email/username and password that were stored in the table should match
validations in struts - Struts
validations in struts  hi friends plz give me the solution its urgent I an getting an error in tomcat while running the application in struts validations the error in server as "validation disabled" plz give me reply as soon
Struts Validations - Framework
Struts Validations  What is the server-side validations exactly? give me on example
Custom Validations - Struts
Custom Validations  Hi, I am trying to do the custom validations in struts 1.1.That is how can we plug in our own custom validations... in advance Vikrant  Hi friend, For more information on struts 1
Im not getting validations - Struts
Im not getting validations  I created one struts aplication im using... in s-c.xml But Im unable to get validations This is my validation.xml file.. and Struts
Not retriving the validations from validation.xml - Struts
Not retriving the validations from validation.xml  I have create the file called register.jsp    LoginID: Password: when i
Struts: validations code to support 2 date foramats - Struts
Struts: validations code to support 2 date foramats  What is the code in validation.xml to support 2 date formats (DD-MM-YYYY & DD/MM/YYYY ) in form. (I'm using struts 1.3
validations  How to get All Client and server side validations in spring using jsp   Please visit the following link: Spring Validation Example
validations in javascript
validations in javascript  How do you check validations in javascript
Spring Validations
Spring Validations  Hi.. i need code for validations using spring annotations
Struts   1)in struts server side validations u are using programmatically validations and declarative validations? tell me which one is better ? 2) How to enable the validator plug-in file
Multiple Validations on jTestFields
Multiple Validations on jTestFields  Hi, I am working on an window application in which I have to validate the data of text fields, like if textbox1... then it should check whether it is valid or not. Unless all the validations
listbox and textbox validations
listbox and textbox validations  hi, any one please tell me how to set validations for listbox and textboxes using bean classes? thank you   Please visit the following link:
struts  Hi, i am writing a struts application first of all i am takeing one registration form enter the data into fileld that will be saved perfectly. but now i can apply some validations to that entry details but with out
technologies like servlets, jsp,and struts. i am doing one struts application where i doing validations by using DynaVAlidatorForm in that have different fields... date integer double type and perform validations thank U   Please visit
Javascript validations problem
Javascript validations problem  i have attached two jsp files 1.sports1.jsp and sports.jsp files Here when i run my sports.jsp file my validation works correctly but when my validation fails i am getting an alert window and i am
select box and text box validations
select box and text box validations  hi, any one please tell me how to set validations for select box and text boxes using bean classes? thank you   Please visit the following link:
Struts   How to retrive data from database by using Struts
Struts  what is SwitchAction in struts
Struts  how to learn struts
STRUTS   Request context in struts? SendRedirect () and forward how to configure in struts-config.xml
validation - Struts
validation  Hi Deepak can you please tell me about struts validations perticularly on server side such as how they work whats their role etc.? thank you
struts  in industry, struts 1 and struts 2. which is the best? which is useful as a professuional   Have a look at the following link: Struts Tutorials
Struts  Tell me good struts manual
struts  what are the 4 methods of struts framework


Advertisement null