====== jQuery Validation Plugin ====== * http://jqueryvalidation.org/ ===== RegEx 정규 표현식 ===== * [[http://stackoverflow.com/questions/13785529/add-regex-to-jquery-validate|add regex to jquery.validate]] $.validator.addMethod("regex", function(value, element, regexpr) { return regexpr.test(value); }, "Please enter a valid pasword."); $("#myBlahForm").validate({ rules: { somePassword: { required: true , //change regexp to suit your needs regex: /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])\w{6,}$/ minlength: 5, maxlength: 8, } } .... );