6,747 questions
-2
votes
2
answers
75
views
Bootstrap 5.3.5 disable submit button doesn't work [duplicate]
I have the following form:
<form id="chatForm" name="chatForm" action="{{url_for('home.invoke')}}" method="post">
<div id="message-box&...
-1
votes
1
answer
47
views
Using the value of a checkbox in a jQuery Validation add method doesnt work [duplicate]
I am attempting to use the value of a checkbox on a form to control the validation of other fields. But it seems that the value is always false inside the addmethod routine. I must be doing something ...
0
votes
0
answers
26
views
Does JQuery Validator's form.validate() actually validate? [duplicate]
In the examples they all show calling something like this.
$('#myform').validate(
rules: {
myfield: 'required'
}
)
However, in my pages when that's all I call it doesn't actually validate the ...
-2
votes
2
answers
154
views
How to execute jquery validation to array of input elements [duplicate]
I have a dynamic list of inputs that gets name of the user. I need to validate, using jquery validate plugin. Below is my code structure.
Either jQuery validate does not support this array of ...
-1
votes
1
answer
54
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
40
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
57
views
How to validate array of array inputs Jquery? [duplicate]
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> ...
-1
votes
1
answer
62
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
246
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
932
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
39
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
85
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
21
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
54
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
144
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
58
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
109
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
36
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
2k
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
119
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
735
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
407
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
327
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
114
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
35
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
777
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&...
0
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
1k
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
56
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
78
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
102
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
93
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
125
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
185
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
46
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
30
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
443
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
155
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
234
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
242
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
493
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
400
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
19
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
86
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
81
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
49
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
303
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
137
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 ...