6,761
questions
-1
votes
1
answer
21
views
How to focus or scroll to custom checkbox hidden element? [duplicate]
I have a custom card checkbox. I want to focus and scroll on form submit(form is being validated using jQuery validation) to this card checkbox if it(card checkbox) is required and not checked. How to ...
-1
votes
1
answer
28
views
Using sub rules via Jquery Validation data-rule attributes
Referenece: https://github.com/pes10k/jquery.validate.file/blob/master/jquery.validate.file.js
$("#upload_form").validate({
rules: {
example_file: {
...
0
votes
2
answers
38
views
How to validate array of array inputs Jquery?
How do we validate array of array input boxes using jquery validation plugin?
Below is html code.
<form id="transport-form">
<div class="form-group>
<label> ...
0
votes
0
answers
43
views
Is it incorrect to add the same JQuery Validate rule twice to a dynamic field and is it detrimental?
I have a large number of dynamic cloned fields on a form. The fields are cloned groups.
Every time I add a clone I use a wildcard selector to allocate the rules to all the fields in the DOM.
$(...
-1
votes
1
answer
42
views
Dynamically added Select 2, Jquery Validations doesn't work [duplicate]
I'm developing a form for users to add multiple items to their cart and need to validate that none of the fields are left empty. I'm utilizing the Select2 plugin and Jquery Validator and jQuery for ...
2
votes
1
answer
85
views
JQuery Validation conditions for Italian Fiscal Code and VAT number
I'm using the Jquery Validation plugin for my registration form. Users should enter an Italian VAT number ONLY if the company field is filled in, otherwise they should fill in the CF field.
At the ...
0
votes
1
answer
526
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 ...
0
votes
0
answers
35
views
JQuery Validate: custom rule triggering on specific events [duplicate]
I would like to add a custom rule to jQuery Validate that allows me to do a check and some specific actions according to the event triggering it.
For example for an email, after the 1st submit of the ...
0
votes
1
answer
79
views
jQuery Validation custom method
I'm building a form using Google Places API and jQuery Validation. I have a field for the user to populate an address and I need to force him to select an address from the Google Places API ...
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 ...
0
votes
0
answers
19
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
45
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
117
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
54
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
99
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
28
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
2
answers
1k
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
87
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
592
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
259
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
272
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
82
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
701
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
2k
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 ...
1
vote
1
answer
870
views
jquery validation for modal popup form
<script>
function submitAddStudent() {
$("#modalForm").validate({
rules: {
name: {
required: true,
letterswithspace: true
},
email: {
...
0
votes
0
answers
23
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
52
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
63
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
96
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
91
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
120
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
158
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
45
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
28
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
284
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
1
answer
137
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
221
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
213
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
484
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
352
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
83
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
75
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
44
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
291
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
114
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
91
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
552
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) {...