Questions tagged [remote-validation]

Remote Validation is the ability to call a custom server-side validation method via the client-side.

166 questions
0
votes
1 answer

MVC Remote Validation Error kept after change

I'm having trouble with my remote validation checking a second time after an invalid email has been given. I can't figure out why it's not removing the error after its no longer invalid. Here is my Model: [Required(ErrorMessage = "An email is…
Parker3306
  • 63
  • 3
  • 9
0
votes
2 answers

Remote validation asp.net mvc

I am new in mvc so forgive me if the question is stupid but I want to do the best I can. So, my situation is that: I have created a model and decorated like Partial Public Class App_Modules
Makis
  • 337
  • 1
  • 15
0
votes
2 answers

Remote validation never gets called in Create view but it does in Edit view

I have a form in a Create View, for some reason it does not submit and hence does not call the Create controller. If I use the exact same view but for the Edit controller it works perfectly and both Create and Edit controller methods take the same…
Magnus
  • 514
  • 2
  • 7
  • 19
0
votes
1 answer

Unable to Validate Existing email Id using [Remote] data annotation attribute

I want to validate existence of Email Id in database using [Remote] data Annotation in Model. But when I call a remote JsonResult Action method the parameter will be null and the result will be always be false and error message will be displayed.…
Guruprasad J Rao
  • 29,410
  • 14
  • 101
  • 200
0
votes
1 answer

ASP MVC Remote Validation Removing Area

I have the following Model: public class UserModel { [Required] public String Name {get; set; } [Required] public String Surname {get; set; } [Required] [Remote("ValidateIdNumber", "CustomValidation", "", ErrorMessage = "Invalid…
0
votes
1 answer

Display ValidationMessageFor separately outside the form, using remote validation

I ran into a problem, and I hope you can help me solve it. I have a form with several fields in it, few of them validated remotely. @using (Html.BeginForm("Action", "Controller", new { id = "myForm" })) { @Html.AntiForgeryToken() …
0
votes
1 answer

MVC4 custom remote validator message appears, but is ignored at form submit

I have an MVC4 registration form that employs two custom remote validators. The first validator checks for email uniqueness, and works properly. The second checks number of uses for a voucher code. It correctly displays a message after entering a…
Ken Palmer
  • 2,355
  • 5
  • 37
  • 57
0
votes
0 answers

How to Show loading image on Server Side Remote Validation

I Use Remote Validation in my Project and I want to show image when i write Email in textbox and when action call this image is show and when action return result then image is hide and it should be done by server side validation. Please Reply..
0
votes
2 answers

Remote validation not working properly

I have default ASP.NET MVC 4 Account register web form. I am trying to check if username already exist in database. If user name exist, user should be notified. For that, I am using remote validation (following this tutorial). First of all I changed…
user3388473
  • 953
  • 2
  • 12
  • 25
0
votes
1 answer

Apply remote validation for hidden field in mvc4

The remote validation for the hidden field in mvc does not get fired Model : [Remote("checker", "mycontroller", ErrorMessage = "Valid combination of phone and account number required.", HttpMethod = "Get")] public string Validate_cart {…
Nikitesh
  • 1,287
  • 1
  • 17
  • 38
0
votes
1 answer

MVC4 remote validation not working properly

I have a custom message which is the return type of the remote validation method, when the return type was Boolean it was working fine, but now when I changed the return type then I'am getting input-validation-error class in the input field but no…
Nikitesh
  • 1,287
  • 1
  • 17
  • 38
0
votes
1 answer

ViewModel property doesn't bind into controller action parameter

My problem is that my ViewModel property doesn't bind into an action parameter. I think it'll be more clear if i just give you my code. I have a model as follows: namespace Sima3.Models { using System; using System.Collections.Generic; …
0
votes
0 answers

Remote Validation attribute in base Model

I have abstract model which has property that will be validated. I want to set current controller for controller parameter.So,I added my custom attribute which inherits from Remote attribute. The problem is validate attribute applies once when model…
AndreyDG
  • 25
  • 4
0
votes
0 answers

Remote Attribute Validation not working in ASP MVC 4

I have been working with MVC 3 and the [Remote(action,controller)] seems to work perfect, trying to do the same in MVC 4 results in a never called function. A quick google or stackoverflow search will give you lots of the same fails in MVC4. What I…
RandomGuy42
  • 301
  • 4
  • 14
0
votes
0 answers

DefaultModelBinder code not getting called for MVC Remote Validation Calls

I have a DefaultModelBinder which I have inherited from and I have tried overriding the BindModel call and OnPropertyValidating call. However when using ASP.NET MVC's built in Remote validation, when the controller action gets called it bypasses my…
User101
  • 748
  • 2
  • 10
  • 29