I need to creat some customer registration form and i need to check the validation of each line in the form.
What is the best way to do it ? ( i want to use Regular Expression )
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’d suggest looking into the INotifyDataErrorInfo. You can use partial classes on the client side and add attributes provided in the ComponentModel namespace or you can write code to raise these events. WCF RIA services uses the attribute approach in the demos I’ve seen. RIA Services actually uses the same attributes to validate on the server and the client, which has good and bad points to it (in my opinion).
Here are some helpful links I’ve looked at in the past:
http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/11/18/silverlight-4-rough-notes-binding-with-inotifydataerrorinfo.aspx (he has a good start to create a base class to handle most of the INotifyDataErrorInfo functions in one place)
http://thejoyofcode.com/Silverlight_MVVM_and_Validation_Part_III.aspx
http://channel9.msdn.com/learn/courses/Silverlight4/SL4BusinessModule3/SL4LOB_03_03_Validation/
http://weblogs.asp.net/fredriknormen/archive/2009/11/22/silverlight-4-and-asynchronous-validation-with-inotifydataerrorinfo.aspx