Click here to Skip to main content
15,897,187 members
Home / Discussions / JavaScript
   

JavaScript

 
SuggestionRe: Insert Image in to MySql database Pin
Siben Nayak29-Aug-14 5:49
professionalSiben Nayak29-Aug-14 5:49 
GeneralRe: Insert Image in to MySql database Pin
Sunasara Imdadhusen3-Sep-14 21:10
professionalSunasara Imdadhusen3-Sep-14 21:10 
QuestioncreateElement, custom style, turn off webkit Appearance Pin
jkirkerx24-Aug-14 10:13
professionaljkirkerx24-Aug-14 10:13 
GeneralRe: createElement, custom style, turn off webkit Appearance Pin
Sunasara Imdadhusen3-Sep-14 21:11
professionalSunasara Imdadhusen3-Sep-14 21:11 
GeneralRe: createElement, custom style, turn off webkit Appearance Pin
jkirkerx4-Sep-14 6:13
professionaljkirkerx4-Sep-14 6:13 
AnswerRe: createElement, custom style, turn off webkit Appearance Pin
Sunasara Imdadhusen3-Sep-14 21:13
professionalSunasara Imdadhusen3-Sep-14 21:13 
QuestionPassword Validation Pin
jclito21-Aug-14 10:45
jclito21-Aug-14 10:45 
AnswerRe: Password Validation Pin
Richard Deeming22-Aug-14 2:40
mveRichard Deeming22-Aug-14 2:40 
The same character may not appear more than twice in a row (Kabooom1)
If it matches the regular expression /(\w)\1/, then you have repeated characters.


Not more than two sequential alphanumeric characters are permitted (Ab123cym)
Not easy with a regular expression. Try something like:
JavaScript
function limitSequentialCharacters(value, limit) {
    var sequentialCount = 0;
    var prevChar = value.charCodeAt(0);
    for (var i = 1; i < value.length; i++) {
        var char = value.charCodeAt(i);
        if (char === prevChar + 1) {
            sequentialCount++;
            if (sequentialCount === limit) {
                return false;
            }
        }
        else {
            sequentialCount = 0;
        }

        prevChar = char;
    }

    return true;
}



Blacklist some words like: (Mark, London)
You can either use a regular expression like /^Mark|London$/i, or check the input against a list of blacklisted words.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


AnswerRe: Password Validation Pin
ZurdoDev22-Aug-14 9:15
professionalZurdoDev22-Aug-14 9:15 
QuestionAccess Device API using Javascript Pin
Gouranga Das21-Aug-14 8:00
Gouranga Das21-Aug-14 8:00 
AnswerRe: Access Device API using Javascript Pin
Richard MacCutchan21-Aug-14 21:59
mveRichard MacCutchan21-Aug-14 21:59 
AnswerRe: Access Device API using Javascript Pin
Dennis E White22-Aug-14 4:47
professionalDennis E White22-Aug-14 4:47 
AnswerRe: Access Device API using Javascript Pin
Dennis E White22-Aug-14 5:14
professionalDennis E White22-Aug-14 5:14 
QuestionAccess Device API using Javascript Pin
Gouranga Das21-Aug-14 7:59
Gouranga Das21-Aug-14 7:59 
AnswerRe: Access Device API using Javascript Pin
ZurdoDev22-Aug-14 9:16
professionalZurdoDev22-Aug-14 9:16 
Questionscrape a table from web Pin
Mahmoud198716-Aug-14 2:58
Mahmoud198716-Aug-14 2:58 
AnswerRe: scrape a table from web Pin
borchef28-Aug-14 21:08
borchef28-Aug-14 21:08 
QuestionHow to validate postdate? Pin
loga_mca13-Aug-14 21:14
professionalloga_mca13-Aug-14 21:14 
SuggestionRe: How to validate postdate? Pin
Kornfeld Eliyahu Peter13-Aug-14 23:17
professionalKornfeld Eliyahu Peter13-Aug-14 23:17 
AnswerRe: How to validate postdate? Pin
Tushar Guru8-Sep-14 21:57
Tushar Guru8-Sep-14 21:57 
AnswerRe: How to validate postdate? Pin
Sibeesh KV24-Sep-14 0:56
professionalSibeesh KV24-Sep-14 0:56 
QuestionCollapsible gridview using javascript Pin
Member 1097302613-Aug-14 9:35
Member 1097302613-Aug-14 9:35 
AnswerRe: Collapsible gridview using javascript Pin
Anurag Gandhi22-Aug-14 8:56
professionalAnurag Gandhi22-Aug-14 8:56 
QuestionForum software.. Pin
Fever42012-Aug-14 5:50
Fever42012-Aug-14 5:50 
SuggestionRe: Forum software.. Pin
Richard Deeming12-Aug-14 8:55
mveRichard Deeming12-Aug-14 8:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.