All Questions
57 questions
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?
...
3
votes
1
answer
183
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 ...
2
votes
0
answers
195
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 ...
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 ...
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-
...
3
votes
4
answers
167
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 ...
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 ...
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 ...
1
vote
1
answer
2k
views
jQuery looping on fields after validation
I have the following code:
...
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 ...
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 ...
-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 ...
5
votes
2
answers
242
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:
...
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 ...
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 ...