1 2window.checkPasswordFormat = (value,username)=>{ 3 $checkUpper = /[A-Z]/; 4 $checkLower = /[a-z]/; 5 $checkAlpha = /[a-zA-Z]/; 6 $checkNumeric = /[0-9]/; 7 $checkSymbol = /[$%(),|=!*~`^_@.\/#&+-]/; 8 $checkSpace = /[ ]/; 9 10 if(value.length >= '8'){ 11 $('#check13501').show() 12 $('#cross13501').hide() 13 }else { 14 $('#cross13501').show() 15 $('#check13501').hide() 16 } 17 if(value.match($checkNumeric) && value.match($checkAlpha)){ 18 $('#check13506').show() 19 $('#cross13506').hide() 20 }else { 21 $('#cross13506').show() 22 $('#check13506').hide() 23 } 24 if(value.match($checkUpper)){ 25 $('#check13508').show() 26 $('#cross13508').hide() 27 }else { 28 $('#cross13508').show() 29 $('#check13508').hide() 30 } 31 if(value.match($checkLower)){ 32 $('#check13509').show() 33 $('#cross13509').hide() 34 }else { 35 $('#cross13509').show() 36 $('#check13509').hide() 37 } 38 if(value.match($checkSymbol)){ 39 $('#check13507').show() 40 $('#cross13507').hide() 41 }else { 42 $('#cross13507').show() 43 $('#check13507').hide() 44 } 45 if(!value.match($checkSpace)){ 46 $('#check13502').show() 47 $('#cross13502').hide() 48 }else { 49 $('#cross13502').show() 50 $('#check13502').hide() 51 } 52 if (strstr(value,username) == 0) { 53 $('#check13504').show() 54 $('#cross13504').hide() 55 }else { 56 $('#cross13504').show() 57 $('#check13504').hide() 58 } 59} 60 61function strstr (haystack, needle) { 62 var i = 0, 63 tempLength = 0, 64 temp = []; 65 for (;;) { 66 if (haystack[i] === undefined || needle == null) { 67 return 0; 68 } 69 //if the char doesn't match then reset 70 else if (haystack[i] !== needle[tempLength]) { 71 temp = []; 72 tempLength = 0; 73 } 74 //the char matches so let's store it. 75 else if (haystack[i] === needle[tempLength]) { 76 temp[tempLength] = haystack[i]; 77 if (needle[tempLength + 1] === undefined) { 78 return 1; 79 } 80 tempLength++; 81 } 82 i++; 83 } 84};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.