I am trying to understand how remote validation works. It works great client side or in browser. This is what I did, I need to check if a username exists while registration. So I added remote validation and it worked perfectly in browser. I wanted to test it on submit, so I captured the request in Fiddler and changed the username to something that exists and then submitted the request. It accepted. RemoteValidation did not occur (of course it failed at db). Hence doesn't it validate on server side?
Asked
Active
Viewed 1,316 times
2
-
Couple of days ago I thought that, too and I was lazy to do what you just did : diving into it. – tugberk Sep 25 '11 at 18:47
-
I am having the same issue too. – Ben H Oct 02 '11 at 21:58
-
@Jonna see this blog post : http://www.tugberkugurlu.com/archive/asp-net-mvc-server-side-remote-validation – tugberk Nov 06 '11 at 20:33
1 Answers
2
Hence doesn't it validate on server side?
No, of course that it doesn't validate on the server. It's just an AJAX call when you modify the value of the corresponding input but when the form is submitted you should obviously perform this validation once again.

Darin Dimitrov
- 1,023,142
- 271
- 3,287
- 2,928
-
1Somehow it is counter intuitive because other validators do apply on the server side as well. Anyway thanks for confirming. – Jonna Sep 25 '11 at 20:00
-