Skip to main content

aspnet

xVal.WebForms, Validation Groups and CausesValidation Part II
·143 words·1 min
dotnet aspnet xVal
A friend came with two issues concerning my recent post about xVal.webForms ValidationGroups and CausesValidation support. 1.- Supress Validation was being rendered as many times as ModelValidators where in the page. 2.- When more than one ModelValidator control was in place, xVal.AttachValidator script options could be incomplete, specifically the valgroups, cause the loop through page collections was done in the OnInit method of the controls before the page control tree was complete.
xVal.WebForms, Validation Groups and CausesValidation
·201 words·1 min
dotnet aspnet xVal
In one of our recent projects we needed a behavior like the ASP.Net ValidationGroups and also be able to relay on the CausesValidation of all controls implementing IButtonControl interface control. So the first issue I faced was that jquery-validate plugin version 1.5.1 (The one that xVal.WebForms uses) does not support grouping in an ASP.Net way. I found the solution to this first problem in this article: http://plugins.jquery.com/node/7044. I did some tests on worldspawn work and did not find any problem with the implementation.
Using xVal, CSLA.NET and DataAnnotations.
·138 words·1 min
dotnet aspnet xVal
I’ve been working for years with CSLA to create business layer objects. Recently I started using XVal 1.0 and XVal.WebForms 0.1 for client side validation. I started enforcing our rules as DataAnnotations and also in CSLA AddBusinessRules() method. So if a property of type string was required I used a StringLength DataAnnotation and also a CSLA.Validation.CommonRules.StringMaxLength rule in our business object.
Upgrade xVal.WebForms 0.1 to use xVal.1.0 (Validation Summary Support)
·62 words·1 min
dotnet aspnet xVal
Recently I found out about xVal.WebForms project at CodePlex.com. Its a good implementation of XVal for ASP.Net WebForms made by John Rummell. I missed Validation Summary support so I upgraded John’s code so it could work with XVal 1.0. I submitted two patches modifying ModelValidator.cs and xVal.jquery.validate.js. These changes are now part of the Trunk repository as you can see here: