Questions tagged [remote-validation]

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

166 questions
2
votes
1 answer

get "Request Payload" in asp.net core controller

on the client side, I do $.ajax({ url: '/emplacements/keyexist', type: "POST", data: JSON.stringify(postData), dataType: "json", traditional: true, contentType: "application/json; charset=utf-8", However the values in the…
serge
  • 13,940
  • 35
  • 121
  • 205
2
votes
3 answers

MVC 5 remote validation not fired

I'm trying to implement remote validation in MVC. I have read several tutos and questions already posted here, but there is no answer. Controller : public class GroupsController: Controller { [HttpPost] public ActionResult…
Manta
  • 490
  • 5
  • 18
2
votes
1 answer

Jquery Validaton using remote and Laravel 5.2 is not working

I am trying to validate is email id exist or not, using remote in jquery validation, but its showing Object Not Found and error code is 404 in console. i think weather it is not taking url as route as per the laravel: so i tried this also url: "{{…
2
votes
0 answers

Generic Remote Validations in MVC 5

I am developing an MVC 5 app using EF 6 database first approach. I have a certain validation which is required for fields in many of my models. I am using remote validation for validating them. Since it was being used in a lot of models so I am…
Awais Mahmood
  • 1,308
  • 4
  • 21
  • 51
2
votes
0 answers

jquery .valid() = true before remote validation

I am working in MVC5 and using a combination of client and server validation. For this particular issue I am using remote validation. The Razorview:
@using (Html.BeginForm("StudentStatus",…
2
votes
1 answer

ASP.net MVC 4 Remote Validation does not work

I try to validate a String in a EditorFor.. If the Licence is not in my Database I want to print an Error.. Here is my Model: [Display(Name = "Lizenznummer")] [Required] [Remote("IsLicenseValid", "HLRController", "Lizenznummer…
Klatschen
  • 1,652
  • 19
  • 32
2
votes
0 answers

MVC3 - How to remote validate on checkbox click?

I am using the Remote Validation attribute on my domain model, to call an Action that returns Json. This validation occurs on a checkbox and it only kicks in when the form is submitted. I'd like it to act the same way that text boxes remote…
Fabio S.
  • 460
  • 7
  • 22
2
votes
1 answer

MVC 3 remote validation for multiple fields

I would like to validate that at least one of three fields is not empty. I am trying to do this using ASP.NET remote validation mechanism. I have the following model: public class MyModel { public MyModel() { …
2
votes
1 answer

MVC3 Remote Validation with DataAnnotationsModelValidator adapter

I want to validate various telephone number properties on a DTO property of my model using a custom DataAnnotationsAttribute. I don't want to duplicate the DataAnnotations onto ViewModels, to keep the code DRY, and instead I have registered a…
2
votes
0 answers

Remote validation on MVC3 is trigger on keypress/keyrelease instead on lostfocus

I'm trying Remote validation on MVC3 for an user name input text on a register form, everything work ok except that I'm expecting the remote validation trigger when the input lost focus but it is triggering on every key-press or key-up that is…
Diego
  • 666
  • 1
  • 8
  • 27
2
votes
0 answers

Need help writing a validation method to check if a video URL is allowed and if the video on the site actually exists using oEmbed

I'm having a difficult time trying to add a validator method to check not only if a URL is allowed (from YouTube or Vimeo using a regex string), but also if the video actually exists on the sites and isn't a 404. So far I have my URL validator…
2
votes
1 answer

Remote Validation works on textbox lost focus, but the ModelState.IsValid is always true

I have a model with RemoteValidation Attribute. When I enter "test" which already exists in the database and I click on an area except the OK button then I get in red colors: "test already exists." So far so good. When I click then the OK buttona…
Elisabeth
  • 20,496
  • 52
  • 200
  • 321
1
vote
1 answer

MVC 3 Remote Validation jQuery error on submit

I seem to have a weird issue with remote validation on my project. I am doing a simple validation check on an email field to ensure that it is unique. I've noticed that unless I put the cursor into the textbox and then remove it to trigger the…
Richard Reddy
  • 2,120
  • 3
  • 25
  • 39
1
vote
0 answers

EF 4 + MVC: jQuery autocomplete and RemoteValidation conflict issue

I have the known issue with jQuery autocomplete and Remote Validation: if I write some values inside an autocomplete control, when I select the value and the control lose focus, the value passed to remote validation is the typed one and not the…
Larry
  • 573
  • 5
  • 14
  • 31
1
vote
1 answer

MVC3 Remote Validation

I am currently in the proccess of setting up remote validation using MVC3 so that a user is alerted if their chosen username already exists. Everything is set up and working correctly appart from the most important part, the error message not being…
1 2
3
11 12