Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
2 votes
2 answers
242 views

validating form before uploading files

This function below return true/false. How I could possibly improve the code quality? ...
Jefferson's user avatar
  • 413
3 votes
1 answer
184 views

Submitting form jQuery checkboxlist

In my requestForm submit function I have this logic that checks three checkboxes and then displays the label with an error message. Is there better logic? I would be happy for any kind of feedback ...
Jefferson's user avatar
  • 123
2 votes
0 answers
204 views

jQuery validation for multi-page registration form

I use JS/JQuery validation for radioboxes, input field etc. Because of AJAX I use one global validation (in a separate file) and 4-5 other files to coverage actions in a relevant registration form ...
mr_muscle's user avatar
  • 197
2 votes
2 answers
911 views

Validate Email as User is typing (JavaScript)

I have the following javascript function validateEmail(value). The goal of the function is to validate the users inputted email as they are typing. So if someone puts nfg@*gmail.com the email will be ...
Nick Gallimore's user avatar
0 votes
2 answers
96 views

jQuery function to display an alert when submitting blank fields

I am new to jquery and implemented following function in a js file in case of error- ...
AnalyticsPy's user avatar
3 votes
4 answers
168 views

Simplify form validation with function

In jQuery, I have been reluctant to create a better form validation, and I feel the time has come for me to do so. With that said, I have been using this particular type of form validation, and I ...
John Beasley's user avatar
8 votes
2 answers
28k views

Conditional validation on two input fields that depend on each other

My code consists of two input fields and a submit button. The business rules require the following rules: At least one field must be filled out. Both can be filled out but both cannot be blank. If the ...
Iceape's user avatar
  • 315
0 votes
1 answer
1k views

Inputs equality check using jQuery without plugins

I tried creating a function to check for a match between two email fields, let's say EMAIL and CONFIRM email. I absolutely try to avoid jQuery validate. It is not worth it for a single field. For the ...
Svetoslav Genov's user avatar
1 vote
1 answer
2k views

jQuery looping on fields after validation

I have the following code: ...
Eduardo's user avatar
  • 111
6 votes
1 answer
415 views

Validation for a user form using jQuery

I have a really bad habit at the moment with writing global specific functions to handle data and feel like I could reduce my work load by stop copying the same. Basically I have a registration form ...
Ryan Potter's user avatar
3 votes
1 answer
94 views

Triggering on form submit

In my HTML, I have a large form (id ="myform") that asks users to fill in 5 fields for Date of Birth (DOB), Sex, Weight, Hair Color and Eye Color and then several other fields which don't relate to ...
user3304303's user avatar
-1 votes
1 answer
754 views

Javascript to PHP email validation? [closed]

So I'm working on an application where Javascript will first validate the email using a regex and then once sent to PHP, PHP will verify the user did not modify any of the javascript and validate the ...
Joe Scotto's user avatar
5 votes
2 answers
247 views

Form that reveals more fields as each step has been completed

I'm new to JavaScript and jQuery and need input about how to optimize my script: ...
JohnDoo's user avatar
  • 51
3 votes
1 answer
676 views

Registration form validation in jQuery

I have created a registration form using jQuery. I am validating username and password using an AJAX request. The "submit" button is originally disabled and is only enabled when all three fields of ...
doctorsherlock's user avatar
0 votes
1 answer
404 views

jQuery array of functions validation

I am attempting to validate a set of business rules in order for a user to successfully add to cart. The rules vary from requiting to add/decline a requested add-on to not having more then 60 items in ...
googabeast's user avatar

15 30 50 per page