If I used NHibernate + ASP, I could see UI validation errors like "maximum size is 20" for Student.StudentName field.
If I used CSLA + ASP, I could NOT see ANY UI validation errors (sure, the data is not saved really, but what I need is to show validation errors) :-(
I noticed when using CSLA Mold, the Student entity class has something like:
private void AddCommonRules()
//Validations Of StudentName
ValidationRules.AddRule(CommonRules.StringMaxLength, new CommonRules.MaxLengthRuleArgs("StudentName", 20));
//Validations Of Percentage
ValidationRules.AddRule(CommonRules.IntegerMaxValue, new CommonRules.IntegerMaxValueRuleArgs("Percentage", 100));
Everything looked well, but why the CSLA validation magic did not work here ?
I love Sculpture !!!
Apr 10, 2009 at 1:12 PM
The generated ASP pages support only Validation Application Block.
If you need to change it to CSLA Validation. you need to edit the templates manually.