0

Asp.Net MVC provides an internal remote validation by tagging Remote attribute to respective field in your model . When I tag any field with Remote it generates some extra attributes to support Remote validation .

data-val-remote="EmailID is invalid." data-val-remote-additionalfields="*.EmailID" data-val-remote-url="/Home/TestEmailID"/

How can I achieve the same thing using Fluent Validation ? I searched a lot in google and found one article which says to create a custom remote validator as described in below link but It's a bit difficult for me to understand as I am new to fluent validation .

http://nripendra-newa.blogspot.com/2011/05/fluent-validation-remote-validation.html

If anyone can guide me how to to create this custom remote validator along with JQuery adapter to trigger this I will be really thankful .

tereško
  • 58,060
  • 25
  • 98
  • 150
Deb
  • 391
  • 2
  • 20
  • What have you tried so far? Any code that shows where you're at will be helpful – levelnis Jan 30 '13 at 08:21
  • I was trying to do the same thing what is described in this link . http://nripendra-newa.blogspot.com/2011/05/fluent-validation-remote-validation.html But I am not sure how to register this in App_start and more over I want to create an extension method which should accept controller validation function as an input . Controller validation function returns JSON as desribed in the article . Please share your thoughts and suggestions . – Deb Jan 30 '13 at 22:59

1 Answers1

0

I'm afraid that actually there is no support for Remote validation in Fluent (v3).

Check this thread for more information from developers of FluentValidation.

Some custom implementation here