Hello,
I have made a few changes to the rules engine, namely:
When the Entity validation region is generated the following changes were made:
ValidationRules.Add(Validation.CommonRules.NotNull, "PropertyName");
This has been changed to utilize the new FriendlyName field which it gets the value from the NetTiers mapping file. IE:
ValidationRules.Add(Validation.CommonRules.NotNull, new ValidationRuleArgs("PropertyName", "Friendly Name"));
Several files were modified in order to implement these changes, so I'm not exactly sure of the proper way to get those changes to the team members. I've attached a patch file in case it's useful.
Hope the community finds this useful!
Kevin
Kevin,
Thanks for the contribution (checked-in rev. 516). Great implementation.
I've made a change though, hoping you don't mind. I've renamed the SelectionRequired handler to the ForeignKeyValueRequired, and since your logic handles foreignkeys that are numeric, i've put condition in place to check for the key datatype and render ForeignKeyValueRequired or StringRequired handlers.
[edit] There seem to be already condition in place that performs AllowDBNull check if (! cols[x].AllowDBNull && IsCSReferenceDataType(cols[x])) Your implementation remains, however the handler is removed
Thanks again!
[/edit]
Mike Shatny--------------------------------------------------------------Member of the .netTiers team http://www.nettiers.com--------------------------------------------------------------
Looks great. Glad I could contribute something to the project!