Questions tagged [validationframework]

The XWork validation subsystem of the Struts2 framework that enables the application of input validation rules to Actions before they are executed.

The XWork validation framework used to run the validation rules on actions before executing the action. The validation rules in the action class could be exposed using annotations. The framework is supposed to extensive use of the XWork validators to support server-side and client-side validation.

The validators supplied by the XWork distribution (and any custom validators) come in two different flavors:

1. Plain Validators / Non-Field validators
2. FieldValidators

Plain Validators (such as the ExpressionValidator) perform validation checks that are not inherently tied to a single specified field.

FieldValidators (such as the EmailValidator) are designed to perform validation checks on a single field. They require that you specify a fieldname attribute in the -validation.xml file. There are two different (but equivalent) XML syntaxes you can use to declare FieldValidators:

1. <validator> 
2. <field-validator>

Non-Field-Validator The element allows you to declare both types of validators (either a plain Validator a field-specific FieldValidator).

Field-validator The <field-validator> elements are basically the same as the <validator> elements except that they inherit the fieldName attribute from the enclosing <field> element. FieldValidators defined within a <field-validator> element will have their fieldName automatically filled with the value of the parent <field> element's fieldName attribute. The reason for this structure is to conveniently group the validators for a particular field under one element, otherwise the fieldName attribute would have to be repeated, over and over, for each individual <validator>.

6 questions
3
votes
1 answer

Validation Application Block and .NET 4.0 Code Contracts

Has anyone implemented the Enterprise Library VAB along wtih Code Contracts in .NET 4.0? If so, can you share some insights? Did it help in performance? Any other factors to be considered?
Nick
  • 7,475
  • 18
  • 77
  • 128
2
votes
2 answers

validate struts2 form other than validation framework

In my Struts2 JSP form, there are text fields and a select tag. For example,
Min Naing Oo
  • 1,085
  • 5
  • 24
  • 49
1
vote
1 answer

Can xVal be used for traditional Web forms model?

It appears that xVal fits more into a MVC model. Can it be used for traditional Web forms model? I am currently considering MS Validation block and .NET validation framework. What other validation frameworks can I look into?
Nick
  • 7,475
  • 18
  • 77
  • 128
1
vote
3 answers

XML Based Validation Frameworks Cross Language

I'm about to embark on a new project within which we require the ability to re-use validations based on (preferably XML) on both the client and server. We would setup a service to provide the XML validation configuration data to the client side. The…
Peter
  • 1,776
  • 13
  • 20
0
votes
1 answer

Efficient way to apply xss crosssite scripting for encoding jsp/servlet application

I am working on a jsp/servlet application, now the requirement is to apply cross-site scripting , as it is a huge application that contains around 200 jsp pages,and it is time taken to encode each jsp page so I am looking for a efficient way to do…
Prashant Bhagwani
  • 25
  • 1
  • 3
  • 10
0
votes
3 answers

Selecting a Validation Framework - ASP.NET

Which validation framework would you prefer for a webforms application. This would be for a rather large complex app. I would want to specify rulesets and business validation in a single place and integrate it both on the client and server side. I'd…
Nick
  • 7,475
  • 18
  • 77
  • 128