0

I started developing an application in ASP.NET MVC. Now my question is which validation approach would be a best practice between FluentValidation and DataAnnotations Validation. Though by using FluentValidation i can get rid of inclusion of validation logic in Domain Model Classes and i can get cleaner Domain classes some of teammates are still feel drawn to DataAnnotations validation. So can someone share your thoughts on this and if possible please come up with scenarios where we can justify the idea behind it.

  • Possible duplicate of [Why use fluentvalidation instead of ASP.NET MVC validation](http://stackoverflow.com/questions/6266914/why-use-fluentvalidation-instead-of-asp-net-mvc-validation) –  Jun 17 '14 at 10:02

1 Answers1

0

FluentValidation is best one compare to DataAnnotations because

  1. It provide more validation option.
  2. We can show Localize validation message
  3. Easy to write custom validation
P John Raj
  • 537
  • 1
  • 4
  • 17