Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Gábor Papp
Added: May 21, 2018 3:28 PM
Views: 18
Tags: no tags
  1. <SCRIPT LANGUAGE=JavaScript>
  2.     // <input type="text" name="jelszo" id="jelszo" placeholder="Jelszó" onkeyup="jelszoellenorzes(this)">
  3.     {literal}function jelszoellenorzes() {
  4.         var jelszo=document.urlapform.jelszo.value;
  5.         var re = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/;
  6.         if (re.test(jelszo)) {
  7.             $('#jelszouzenet').hide();
  8.         } else {
  9.             $('#jelszouzenet').show();
  10.         }
  11.         // return re.test(jelszo);
  12.       }{/literal}
  13. </SCRIPT>