I’ve received a lot of email about the best way to handle validation in an ASP.NET MVC application. We posted three new tutorials on validation at the http://www.ASP.net/mvc website. Here is the list:
- Performing Simple Validation – Learn how to perform validation in an ASP.NET MVC application. In this tutorial, Stephen Walther introduces you to model state and the validation HTML helpers.
- Validating with the IDataErrorInfo Interface – Stephen Walther shows you how to display custom validation error messages by implementing the IDataErrorInfo interface in a model class.
- Validating with a Service Layer – Learn how to move your validation logic out of your controller actions and into a separate service layer. In this tutorial, Stephen Walther explains how you can maintain a sharp separation of concerns by isolating your service layer from your controller layer.
I don’t want to suggest that these are the only methods of performing validation in an ASP.NET MVC application. For example, an alternative that is not discussed in these tutorials is the Microsoft Enterprise Library Validation Application Block. In future tutorials, I’ll discuss other methods of performing validation.
Here’s the direct link to the MVC Validation tutorial category:

Thanks for posting these. One little problem… the formatting in the second tutorial (Validating with the IDataErrorInfo Interface) is borked. It appears there’s a missing quote on the pre tags for code samples. Makes it unreadable.
I second @Bill’s comment. Article is totally unreadable due to an unclosed attribute value (missing close quotation mark) for the first code sample. Renders everything beyond it unreadable. Disappointing, as this is the very topic I’m struggling with on my app right now.
@Will, @Bill — Thanks for pointing out the formatting issue — it’s been fixed.
@bill and @Will – it look ok for me. I dont seem to be having problem to view the article.
Hi.. thanks for this information dan this link..
great sharing..
Nice sharing man. That link are so useful to me.
Hi Stephen, I have some spermlinks I would like to share with you. It’s the story of how my colleague got the MVC HtmlHelper stuck up his pooper while trying to make a nested loop in the back of his head. I know this will be of great value for you for further editions of ASP.NET MVC.
In the simple demo you mention needing to add resource strings to customize the prebinding error messages. Can you show an example of how to do this?
Is there any easy way to do validation for properties such as associations in Entity framework? Since there is no OnChanging for such properties… to use IDataErrorInfo?
thanks for the tutorial listings. I should bookmark
Yes.. jackson, i agree with you..
very informative tutorials..
Great sharing here..
Cheers,
inventory management software
Hey..
great tutorials your posting here..
Thanks for sharing.
i like..
Yes.. jackson, i agree with you..
very informative tutorials..
Great sharing here..
You may also use the Validator Toolkit for ASP.NET MVC on codeplex.com: http://mvcvalidatortoolkit.codeplex.com
Graet tutorials and links. Thanks for sharing them.
Thanks for all the great input Stephen. I have tried to use a lot of the architecture you have outlined on MvcCms. We are nearing out first release and would appreciate any feedback on how we might improve the initial architecture. The source is available on codeplex at mvccms.codeplex.com
hello, this is my first time i visit here. I found so many interesting in your blog especially on how to determine the topic. keep up the good work.
Really very nice tutorials Stephen. Thanks for sharing.
May be it’s the first time for me visiting your blog, but I know it contains so many useful things here. thanks a lot.
great work at this post… i like it thanks!
Yes.. jackson, i agree with you..
very informative tutorials..
Great sharing here..
Thanks for these 3 links, Stephen i m waiting for the other one.
Nice Post! Really validations are very important in any applications. Thanks for sharing useful information.
ty for the 3 tutorials links. It gives options to do yourself or it provides some free downloads form what I can see, thank you for sharing this.
Hi.. thanks for this information.
thank you for sharing this.
Thanks for these links.
Useful things here. thanks a lot.
Great sharing here.
Great links. Thanks for sharing them.
Great work at this post.
Very informative tutorials.
Great keep up the good work.
Very important applications.
Thanks for posting these.
Great sharing.
Thank you for sharing these.
Many useful things here. thanks a lot.
Very nice tutorials Stephen.
Stephen Great work.
Great work at this post
That link are so useful to me.
Very informative tutorials.
Very good tutorials.. great work..
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
Very informative tutorial.
This is exactly what i was looking for.
Considering that your blog is really helpful. thanks for the information
Its always good to learn tips like you share for blog posting. As I just started posting comments for blog and facing problem of lots of rejections. I think your suggestion would be helpful for me. I will let you know if its work for me too.
Thanks and keep post such a informative blogs.
I’ve been looking for some tips about this niche. I just found this on Google. Thank you for sharing this helpful tips..
Thank you for sharing this articles. Very interesting.
Nice article.The code works fine and is a good starting point for me making a
custom module.Thanks for the module..
Thanks for the code which created a great module.
useful code. it helps me. thanks
nice job
thanks for sharing. This article is useful for me..
Useful information
gtr Thanks you for sharing.
thanks for this topic
Hi,
Thanks for posting this tutorial, as it helps to learn alot of new things, Good starting who want to begin with custom module.
Keep Sharing,and Keep going on.
thanks for this nice info, it’s so useful for me.
Looking forward for more such stuff. Loved your style of providing the information and the nature of the content.
thanks for this nice info, it’s so useful for me.
clients get too involved in the small details of a design. Honestly, does it really matter if I put a red box on top or on the bottom of a page? If it’s at the top, then I already made a concious decision about why it’s fine the way it is. I understand that design is subjective, but communicating to a client that they can trust our expertise is very difficult.
Looking forward for more such stuff. Loved your style of providing the information and the nature of the content.
if I put a red box on top or on the bottom of a page? If it’s at the top, then I already made a concious decision about why it’s fine the way it is. I understand that design is subjective, but communicating to a client that they can trust our expertise is very difficult.
then I already made a concious decision about why it’s fine the way it is. I understand that design is subjective, but communicating to a client that they can trust our expertise is very difficult.
Thanks for making things much simpler. I knew there was an easy way out.
Thank goodness i found your article.
Nice information much helpful article thanks for sharing this great information on ASP.NET MVC Validation.
Nice information much helpful article thanks for sharing this great information on ASP.NET MVC Validation. PhD computer science | english diploma
Thank goodness i found your article. bachelor degree business | project management diploma
Thanks for this nice info, it’s so useful for me.
anks for this nice info, it’s so useful for me.
Thanks for this nice info, it’s so useful for me. توبيكات -
thanks for the validation tutorials.
Wow, that was heart provoking article presented by you sir
thanks for sharing
regards
Interesting post. thanks for the time and effort
thanks so much
Thanks for this nice info
Thanks for sharing..
great posts
what a great tutorial, it’s so useful for me. thanks.
Great tutorial!!!
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful and beneficial to your readers.
Its always good to learn tips like you share for blog posting. As I just started posting comments for blog and facing problem of lots of rejections. I think your suggestion would be helpful for me. I will let you know if its work for me too.
Thanks and keep post such a informative blogs.
good.
Essay Service
|
Thanks for sharing..
hockey live scores–championship live scores–international soccer scores
Interesting post. thanks for the time and effort
Kamagra distributor–buy kamagra online–Kamagra wholesale–Kamagra Wholesale suppliers
Very nice tutorials Stephen. keep post
great info, this information useful for me, thanks regards Oes Tsetnoc wongsableng visit my article here Oes Tsetnoc , another here Oes Tsetnoc , and here Oes Tsetnoc thanks
don’t forget visit my another article Kenali dan Kunjungi Objek Wisata di Pandeglang
| Mengembalikan Jati Diri Bangsa | Bisnis Pulsa Eranet | Kenali dan Kunjungi Objek Wisata di Pandeglang
| Mengembalikan Jati Diri Bangsa
great info, this information useful for me, thanks regards Oes Tsetnoc wongsableng visit my article here Oes Tsetnoc , another here Oes Tsetnoc , and here Oes Tsetnoc thanks
don’t forget visit my another article Kenali dan Kunjungi Objek Wisata di Pandeglang | Mengembalikan Jati Diri Bangsa | Bisnis Pulsa Eranet | Kenali dan Kunjungi Objek Wisata di Pandeglang
| Mengembalikan Jati Diri Bangsa
Thanks for the simple and easy to follow tutorial on how to perform validation in an ASP.NET MVC application, it helped me a lot thanks.
322 It’s lucky to know this, if it is really true. Companies tend not to realize when they create security holes from day-to-day operation.
nice article, this information useful for me, thanks regards Oes Tsetnoc wongsableng visit my article here Oes Tsetnoc , another here Oes Tsetnoc , and here Oes Tsetnoc thanks
don’t forget visit my another article Kenali dan Kunjungi Objek Wisata di Pandeglang
| Mengembalikan Jati Diri Bangsa | Bisnis Pulsa Eranet | Kenali dan Kunjungi Objek Wisata di Pandeglang
| Mengembalikan Jati Diri Bangsa
amazing information, this information useful for me, thanks regards Oes Tsetnoc wongsableng visit my article here Oes Tsetnoc , another here Oes Tsetnoc , and here Oes Tsetnoc thanks
don’t forget visit my another article Kenali dan Kunjungi Objek Wisata di Pandeglang
| Mengembalikan Jati Diri Bangsa | Bisnis Pulsa Eranet | Kenali dan Kunjungi Objek Wisata di Pandeglang
| Mengembalikan Jati Diri Bangsa
selam hi This sounds fascinating sıcak sohbet I’m going to read that tracing articlekısa aşk şiirleri when I have a moment.
Wow. erotik film izle is
şifalı bitkiler zayıflama de
çet sohbet fer
netlog ger
müzik dinle err
şarkı dinle
cüneyt arkın filmleri kk
isyan sözleri fer
hikayeler er
islami çet
escort bayanlar der
bedava chat dd
chat odaları der
liseli kızlar derf
kızlarla sohbet fder
kızlarla chat
sohbet errNB
nice information.
I haven’t any word to appreciate this post…..Really i am impressed from this post….the person who create this post it was a great human..thanks for shared this with us.i found this informative and interesting blog so i think so its very useful and knowledge able.I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.In fact your creative writing abilities has inspired me.Really the blogging is spreading its wings rapidly. Your write up is fine example of it
I havent any word to appreciate this post…..Really i am impressed from this post….the person who create this post it was a great human..thanks for shared this with us.
thanks..your blog is full of useful knowledge..
May be it’s the first time for me visiting your blog, but I know it contains so many useful things here. thanks a lot.