Questions tagged [jquery-validate]
The jQuery Validate plugin is a jQuery plugin by Jörn Zaefferer. Its purpose is to perform client-side form validation of user entered data.
6,768
questions
0
votes
0
answers
23
views
jQuery Check If Any Checkboxes Checked - Custom Client Side Validation
During submit, I need to check if any of the checkbox is checked alongside with other required fields on client side.
Here's the model:
Here's the Html:
How to add custom client side validation to ...
0
votes
0
answers
36
views
Jquery Validation not working to an input field that's not exist when document ready [duplicate]
currently i'm working with Jquery validation. It's working well when form is ready.
But when i try to add new field there with the same name by click button. the validation is not working.
<form ...
0
votes
0
answers
17
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 ...
0
votes
0
answers
16
views
JQuery conditional validation for one of two inputs [duplicate]
I have a form that allows for searching by name if they user clicks the id='SearchName' radio.
I currently have it set so that both the first name and last name are required if the person selects that ...
-1
votes
1
answer
40
views
jQuery Validate trigger only one custom method
How to trigger only one specific custom validation? Let's say I have three custom validation methods:
$.validator.addMethod('customValidation1', function (data)
{
}, 'Error');
$.validator.addMethod('...
0
votes
0
answers
45
views
jQuery validator custom "greater than" rule [duplicate]
I'm trying to use a custom validation rule with jquery.validator.
In the form there are 2 text fields 'startdate' and 'enddate', containing date strings (using jquery.ui datepicker).
The date in the '...
0
votes
1
answer
46
views
jQuery validate — Require one specific selection which has a particular data attribute
I am trying to figure out how to validate a specific scenario with jQuery validate. The user must select at least one user from a group of users, but each user in the list has a data attribute ...
0
votes
1
answer
19
views
jQuery validate custom remote method fired just one time [duplicate]
I created a custom method which remotely checks the validity of the email returning different messages based on two cases. I works just the first time the validation started, if I change the input ...
0
votes
1
answer
26
views
Can i format url in jQueryValidate remote method?
Ok, this works fine:
$( "#myform" ).validate({
rules: {
email: {
remote: {
url: "/ajax/check-email.php",
mothod: "get",
dataFilter: ...
1
vote
1
answer
306
views
Summernote validation with Jquery Validation plugin
I have a form with a remote validation field. My Javascript is as bellow:
$("#myform").validate({
rules: {
mainfield: {
remote:{
url: "checksnote....
0
votes
1
answer
61
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 ...
0
votes
2
answers
292
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 ...
-1
votes
1
answer
91
views
how to prepend an icon to error messages on form validation jquery [duplicate]
I used the following code to prepend an icon to the form validation error messages but when the user clicks on the form field and clicks away without fixing the field the icon disappears:
...
0
votes
0
answers
110
views
Value allowing with or without comma's in the text field [duplicate]
I have an amount text field allowing the value as "1,232,454.23", maxlength="12" . Database size is NUMBER(9,2) and it works fine.
When User tries to enter a number 123245444.23 (...
0
votes
0
answers
53
views
Verify Form is Valid before Modal show [duplicate]
I've been searching similar questions, but I am having a hard time relating my setup with what I see in other questions. Maybe I am having a fundamental misunderstanding of the JQuery validation ...
0
votes
0
answers
31
views
Is there a method in JQuery similar to "is_unique" in Codeigniter-4 [duplicate]
I want to ask if is_unique in CodeIgniter 4 is available in jQuery Validate?
I'm trying to solve my coding problem which involves the is_unique validation from CodeIgniter 4.
Here is sample of my code ...
0
votes
0
answers
364
views
HTML <input type="date" not validating min attribute correctly [duplicate]
I have a form with a date field. The field is required and should not allow a date sooner than 2 days from the current date.
<input type="date" id="DayDate" name="DayDate&...
-1
votes
1
answer
745
views
How to add 'is-invalid' class on choices.js
I am currently using validate.js to validate my form and choices.min.js as a substitute instead of using select in order for me to have a proper search bar on select. I am currently testing the ...
0
votes
1
answer
343
views
jquery validation for modal popup form
<script>
function submitAddStudent() {
$("#modalForm").validate({
rules: {
name: {
required: true,
letterswithspace: true
},
email: {
...
0
votes
0
answers
22
views
jQuery remote validate not working with django url [duplicate]
when i submit form, adno field (number) not validate excluding empty
my template.html
<input name="adno" id="id_adno" type="number" class="form-control" ...
0
votes
0
answers
47
views
validator, condition is not evaluated right
I have a form which contains four inputs (start/end and start/end time).
I want to validate that end time should be greater than start time, if start and end dates are equal. For that I have a method ...
2
votes
1
answer
59
views
Why function is not entered
I have the following Jquery custom validation method :
$('#save-event-challenge').off('click').on('click', function (e) {
let $btn = $(e.target);
jQuery.validator.addMethod('minTime', ...
1
vote
1
answer
90
views
Validation form before submit is not showing any validation messages?
I have jQuery validation library used on application, but when I validate before submit is not working. When inspect the element its said line 1 of this file below, need some help.
$(function (){
$(&...
0
votes
0
answers
85
views
Multistep form with two terms checkboxes on different steps failed to validate properly using jQuery validate plugin?
Form which has two checkboxes for agreement on different steps (first and last). First one is working totally fine, however the last step is not working properly.
Here is html code
<form method=&...
2
votes
0
answers
110
views
jQuery form validation after embedding Html with JS
I have a website developed within ASP.NET Core MVC (.NET6) + jQuery, Bootstrap. Due to some restrictions, some navigation pages must be embedded dynamically by non-typical way using Ajax request.
$....
0
votes
0
answers
119
views
jQuery Validate Plugin not Working with Typescript
Can't seem to get jQuery validate pluging to work with Typescript.
This works:
$(document).ready(function() {
alert('hi')
})
This gives a compilation error:
' Property 'validate' does not exist ...
0
votes
0
answers
44
views
How do I validate forms in multiple tr inside a table?
I have multiple forms inside table in each tr like this but when clicking on save validation is not working. I want to validate parent form of .save button. Does anyone know how can I do this?
/// ...
0
votes
0
answers
27
views
Jquery Validation dynamic inputs [duplicate]
Can I add the Jquery Validation to dynamic inputs? I have this sample below where I need it validate just the inputs without the placeholder. I am using keypress to get all the events of a input ...
0
votes
0
answers
139
views
How to validate using jQuery Validate plugin, array input name [duplicate]
if I give index in input array then only required working other validation not working
<input type="text" name="batch_no[0]">
<input type="text" name="...
0
votes
0
answers
92
views
NuGet JS file installation for jquery-validation plugin
I'm using the jquery-validation plugin (https://github.com/jquery-validation) and I've installed it via NuGet Package Manager in Visual Studio. On the repository I see multiple files that are not ...
0
votes
1
answer
112
views
JQuery Validation Works One way but Not Another
I'm working on a Django project involving the use of validating forms. I have my validation working, including all the rules I have applied, in one approach (the form is created when the page is ...
-2
votes
1
answer
148
views
validation to ignore space at beginning of a text field [duplicate]
I try:
regno: {
required: true,
maxlength: 20,
noSpace: true
}
Can somebody assist me to validate text field that the beginning does not allow space?
0
votes
1
answer
150
views
Getting updated input value for further update in jQuery
I use an Ajax form (with JQuery Validation Plugin) on my site. It works except for the following problem: if I enter something in a text field and then click on the send button, the value is updated. ...
0
votes
1
answer
417
views
JQuery validator - Bootstrap - DO NOT validate a specific input [duplicate]
There's a way with JQuery validator to validate all the form, but do not validate a specific input?
Here a Code Snippet example for this:
jQuery.validator.setDefaults({
debug: true,
...
-1
votes
1
answer
226
views
Set oninvalid and oninput properties of input fields from jquery
I want to use custom form validation for my input fields. I want to display a custom message and make borders red of input fields. The problem is that I am unable to do this in jQuery. For Html, I ...
0
votes
0
answers
18
views
jQuery input field is always validated even when it's not mandatory [duplicate]
I use jQuery Validate plugin with addMethod function. 1 field is using addMethod but it's not mandatory. However somehow that Percentage field is always validated even when there's no value. Please ...
0
votes
1
answer
76
views
jQuery Validation: in "rules: {..}" determine which Submit was clicked (one of several)
There are similar threads on determining which Submit was clicked from submitHander(form):
Jquery Validation, Get button clicked in submitHandler() Thanks to having form we can call an undocumented ...
0
votes
1
answer
62
views
ajax function calling multiple times inside jquery validator
I'm trying to validate attachment field, below code is working but when i use async false
attachment:{
required:{
depends: function () {
var ...
0
votes
0
answers
36
views
Symfony EntityType Extended with Jquery Validate Plugin
I encounter a problem related to the use of the EntityType with the extended and multiple set to true (which generates checkboxes) and then validating each field separately (required or not) using the ...
0
votes
0
answers
247
views
Jquery validator doesn't validate homonymous input field (input array) [duplicate]
I have a form with many fields with the same name, this will be an array input for PHP.
<input type="text" name="user[]" required />
Unfortunately it seems that Jquery ...
1
vote
0
answers
86
views
jQuery Validate with custom web components
With the addition of form associated web components, we are now able to write custom web components that act as a form item when placed inside a form. I am wondering if it is possible to use jQuery ...
0
votes
1
answer
1k
views
validation of textarea input in form
I leave here an example of the problem I have in validating my form with textarea. When I click to send the form without filling in the textarea, the warning that the field is mandatory, this message ...
0
votes
0
answers
80
views
jquery validate message container
I want to show error messages after input (what is working fine:
and after submit in message container which is default in form:
$("#form_name").validate({
highlight: function (...
1
vote
1
answer
525
views
JQuery Validation - Remote method always check and become true before submit the form
Using jQuery validation plugin, I have been trying to validate and submit my form. JS code for this as shown below.
jQuery.validator.addMethod(
"regex",
function(value, element, regexp) {...
0
votes
2
answers
411
views
Before Date Validation in jQuery and validation plugin
I'm trying to validate that the entered date in a HTML form is before a particular date (January 1st, 1980) but am unable to validate using jQuery. Here is my code:
jQuery.validator.addMethod("...
-2
votes
1
answer
178
views
Jquery Validation plugin Error messages on Bootstrap 5.x popovers
I am using jquery validation plugin with bootstrap 5.x version popovers, but not able to figure out the right solution, please help any one ?
0
votes
2
answers
927
views
jquery validation shows uncaught type error
Trying to implement jquery validation because I need to be able to validate hidden inputs.
I initialize the plugin in document ready but on submit, I receive the following error:
Uncaught TypeError: ...
0
votes
1
answer
382
views
Jquery Form validation for select2 multiple [duplicate]
I have form in which I have field courses with multi select option. Also there are more than 2courses field in form like below :-
name="courses[0][]"
name="courses[1][]"
How can ...
0
votes
0
answers
611
views
validating that a canvas has been drawn in
I'm implementing an online waiver where a client has to sign into canvas before they can complete the form. I use Signature_Pad from szimek and jquery-validate and would like to have the canvas (...
0
votes
1
answer
2k
views
Error message color on input validation using jquery-validation and bootstrap 5
Edited:
I am using jquery-validation and bootstrap 5 to validate the form and show errors messages. When I hit login without email AND password the input field color became red for each field (email + ...