开发者

How can you use INotifyDataErrorInfo/ValidationSummary for server side validation?

开发者 https://www.devze.com 2023-03-23 06:46 出处:网络
I have various client side validation rules I\'m using such as Required on certain fields. I also have some database validation rules such as unique constraints that really need to be done server-side

I have various client side validation rules I'm using such as Required on certain fields. I also have some database validation rules such as unique constraints that really need to be done server-side. I've bubbled the error messages back up to the client, but how can I show them using INotifyDataErrorInfo/ValidationSummary?

If at all possible I'd like these errors to be shown in the ValidationSummary control as well as the control/property that caused the开发者_如何学运维 error. Is this even possible?


here is a post explain Asynchronous validation : http://weblogs.asp.net/fredriknormen/archive/2009/11/22/silverlight-4-and-asynchronous-validation-with-inotifydataerrorinfo.aspx

in your case, you will have to set your additionnal asynchronous ValidationAttribute onto the Class itself ! (witch will add validations errors to your object)

0

精彩评论

暂无评论...
验证码 换一张
取 消