2
votes
1answer
30 views

Can this date-validation function can be simplified further or is it the correct approach?

I am doing a date validation. I have no. of pages, which have the date field. User can input the date like "220875" or "22AUG75" - I need to test both and check the length as well. ...
4
votes
1answer
36 views

Multiple drop down validation

I have written some jQuery which validates a group of drop downs. It checks the text value selected in all the drop downs (first three characters), and if there is a duplicate, it warns the user. ...
3
votes
1answer
71 views

Can this form validation be simplified made to memory leak free for all browsers?

I am doing a validation and I believe that there are many things that can be reduced or removed. I am still re-working this. But I am looking for some experts to look at my code and offer the very ...
1
vote
3answers
686 views

Validating email without Regex

I'm trying to improve my JavaScript (I'm usually a copy/paste guy but can do basic DOM stuff with jquery too), so I decided to try and make a function to validate an email address without using Regex. ...
2
votes
1answer
235 views

User data storage

I am writing my own website where users sign up. It then saves that data in an array. I want to know if this is effective or if there are better ways to do it. ...
2
votes
1answer
109 views

Checking if variable is defined before accessing its properties [closed]

I didn't write this but I noticed it in our codebase at work. ...
3
votes
2answers
117 views

Client-side validator for contact information form (name, phone, e-mail)

My recent post had some things to fix. I think this should be well structured and written for you. How does this code look to you? If something needs to be changed please tell me. ...
10
votes
6answers
2k views

Can people understand my form validation code?

I've just finished creating this form validation but I want to make it public for beginner 'contact us forms'. I was wondering if I can have some peoples' input on if they can understand/read my ...
5
votes
2answers
439 views

Password strength checker

I would like to receive feedback about my code. Is there any better way to shorten the code or is it fine? Demo ...
6
votes
2answers
157 views

Am I implementing BDD correctly?

I'm writing a utility that validates fields on a web site. I decided I'd give Behaviour Driven Development (BDD) a try. The validator utilises rules to determine if a value the user provided is valid. ...
2
votes
1answer
66 views

A class for form data validation

I don't want any feedback on the regexes as I know what needs to be updated here. Also, don't need any feedback on naming conventions. I'm looking for feedback on the structure and correctness of ...
1
vote
1answer
41 views

Auto-Format GPA while typing : REVISED

I need to further simplify this solution to auto-format a text-box field intended only for the user to enter their college Grade Point Average (GPA). Here is my code: ...
5
votes
1answer
100 views

Auto-Format GPA while typing

I'm looking for a more cleaner and simpler solution to auto-format a text-box field intended only for the user to enter their college Grade Point Average (GPA). Here is my code: ...
1
vote
1answer
116 views

Simplify jQuery validation

I wrote a script for validate the input field for following requirements Not null Multiple of hundreds Less than needed amount Here is my script: ...
5
votes
1answer
107 views

Date range validator

I have some code which works fine. First, it checks that dates format are valid and then, checks that first date is lower than second date. I had to use free input text and custom validator because ...
6
votes
3answers
197 views

JS validation and submission with AJAX

I've got an assignment to do pure JS validation as well as submit with AJAX. Here is the code I've got so far. I'm wondering if I can do away with the whole "reason" bit. That was because it was ...
5
votes
2answers
391 views

jQuery wrapper of Parsley.js

In a project, I have a lot of HTML forms without validation and I want to add a front end validation, in a quick way. I start looking for a library and I met Parsley.js. It's a good library, but if I ...
5
votes
1answer
165 views

Validating HTML Form

I am trying to create a simple validation for forms. I am almost there, but there are few bugs and optimization errors that I am really struggling with. I'm looking for advice on how to make this ...
27
votes
5answers
3k views

Verifying password strength using JavaScript

I have a function which verifies the Password field and suggests the user to enter a strong password. I also have a label named ...
6
votes
2answers
108 views

Simplifying this form validation script

Can anyone please help me to simplify this form validation script? It works great but I was just wondering if I can get some help to make it simpler. Your opinion on the approach I used below is ...
1
vote
2answers
95 views

Making the code smaller and manageable

I'm trying to make my code easier to understand by making it more correct and maintainable. Here's the code I'm trying to simplify: ...
3
votes
2answers
195 views

JavaScript form validation: improve on 'good, but not good enough'

I recently received a 'good, but not good enough' rating on a coding exercise I was asked to perform. It was to validate that if "Product complaint" option was selected that Product name, Product ...
1
vote
1answer
154 views

Would like help on improving my jQuery Validation code

Would like some assistance in improving my jQuery validation code. I have some repeated code, but I am not sure how to write it in a way so that I don't have to keep repeating the same code over and ...
0
votes
1answer
521 views

Form validation - security and input specification

So I'm working on a register form and I have four fields: name, username, email and password. I pick up the values of these fields in jQuery and depending on if all the fields are filled, I pass them ...
0
votes
1answer
101 views

Validating Javascript Model

I'm looking to create a model in JavaScript. Here is an example of the code that I have so far: ...
0
votes
1answer
376 views

An own approach to Angularjs validation

Introduction So i am building a SPA with AngularJS. The application provides a large number of <input> elements and can be seen as a huge form. However, i ...
1
vote
2answers
860 views

Javascript form validation (zip code). Something better?

This is my first post. I have a javascript function that I intend use for validating zip codes and I wanted to know if my way could be made better. ...
2
votes
1answer
4k views

My login with AJAX and PHP

In your opinion, do I need to do all these validations. I thought to do well and stay safe but I seriously raises the question if it isn't slower. jQuery code ...
1
vote
1answer
103 views

Refactor function that returns a comma Operator to pass jsHint

Some background This functions does some business logic before submitting a "add to cart" form HTML ...