Skip to main content

Questions tagged [unobtrusive-validation]

Unobtrusive Validation refers to a jQuery plugin created by Microsoft used in conjunction with the jQuery Validate plugin. It is shipped with ASP.NET MVC 3.

unobtrusive-validation
0 votes
1 answer
54 views

Custom TailwindCSS styling of input error state in ASP.NET Core 8 MVC

I am working on an ASP.NET Core 8 MVC application following the Vertical Slice architecture. Here's my controller code: [AllowAnonymous] [Route("login")] public class LoginController(...
J86's user avatar
  • 15k
-1 votes
1 answer
40 views

Show animation on form submission after jQuery validation Razor Page

I want to show a loading animation when a form is submitted, currently I do this with a on click function which shows a bootstrap Modal with the animation within. (HTMl below simplified for question) ...
Ben Dove's user avatar
0 votes
0 answers
25 views

JQuery Telerik Wizard Valid always true on initial page load

I am having an issue where on initial page load (starting debugger) where the valid() function always returns as true onSelect(e) function on Index.cshtml. However, if I just hit enter on the url and ...
user1257758's user avatar
0 votes
1 answer
111 views

Adding dynamically list elements to form and Client Side Validation

I want to add elements of class type Food to a form. When the user clicks some button a row with two elements should be displayed: one dropdown list to choose type of food an input element for the ...
Nikola's user avatar
  • 13
-1 votes
1 answer
380 views

How to trigger my custom validation method from validate() or valid() [duplicate]

I can validate my form by calling $form.validate() and $form.valid(). And so presumably these functions are called automatically when submitting a form. But my question is: If I have a custom ...
Jonathan Wood's user avatar
1 vote
0 answers
227 views

Run custom validation script when form is submitted

I have an ASP.NET Core Razor Pages application with a page that requires some custom validation. I want this validation to run on the client using custom JavaScript. How can I ensure my validation ...
Jonathan Wood's user avatar
0 votes
0 answers
91 views

SweetAlert2 allows an ASP.NET Core MVC form to post with missing required data. How to fix this?

I have an ASP.NET Core MVC application with a large form, including many required fields. If the user tries to submit the form with missing required information, I want to include an alert message as ...
bmurrell30's user avatar
0 votes
1 answer
59 views

ASP.Net Core localized date format validation not working

I'm using the data-val-required to replace the standard message for required field and get a french custom message displayed and it works well. I'm also using the data-val-date attribute to do the ...
Stephane Belzile's user avatar
0 votes
1 answer
65 views

Validate form without submitting it [duplicate]

I have a the following Bootstrap modal. <div id="product-modal" class="modal" tabindex="-1" role="dialog"> <form> <input id="...
Jonathan Wood's user avatar
0 votes
0 answers
19 views

Default Browser Date Validation Suppressed with Jquery Validation [duplicate]

Our team is running into an issue with our date picker. We've a site we made with razor pages and bootstrap 5 and we have a form with a date picker. The date isn't a required field, so we have it as ...
klambert2's user avatar
1 vote
1 answer
16 views

MVC5 Validator Error With Date and DateTime in same page

I have a date and a datetime field in my model : [Display(Name = "Tanggal")] [Required(ErrorMessage = "Tanggal harus diisi.")] [DataType(DataType.Date)] [DisplayFormat(...
Jun Rikson's user avatar
  • 1,982
2 votes
2 answers
160 views

Custom Validation TagHelper: Modify Child Element

I am trying to implement server side validation, by changing the class of an HTML child element within a TagHelper. The TagHelper is the "kendo-datepicker", however the current code ...
Reafidy's user avatar
  • 8,381
0 votes
0 answers
147 views

Custom error message for input type date does not work

I would like to create a custom error message for an input of type date. The rules are, the input is required. If an input is provided, it should be in the range from 1-1-1920 to lastyear (today's ...
William's user avatar
0 votes
1 answer
82 views

Custom errorClass in Unobtrusive Validation ignored with Server Side Validation

I am using unobtrusive validation in asp.net core and have set a custom class in order to utilise the bootstrap CSS classes. This works nicely for client side validation, but the custom class is ...
Reafidy's user avatar
  • 8,381
0 votes
2 answers
558 views

JQuery Validation of Form

I am having a lot of trouble trying to modify the errorClass and validClass with Jquery validation. I assume all I need to do is add the .validate function and set the parameters. Whilst the ...
Reafidy's user avatar
  • 8,381

15 30 50 per page
1
2 3 4 5
83