passwords.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // 비밀번호 재설정 메일
  2. $("#fPasswordEmail").validate({
  3. onkeyup: false,
  4. onclick: false,
  5. onfocusout: false,
  6. showErrors: function (errorMap, errorList) {
  7. if (this.numberOfInvalids() && errorList.length > 0) {
  8. alert(errorList[0].message);
  9. $(errorList[0].element).focus();
  10. }
  11. },
  12. rules: {
  13. email: {required: true, email: true}
  14. },
  15. messages: {
  16. email: {
  17. required: "이메일 주소를 입력해주세요.",
  18. email: "이메일 주소가 유효하지 않습니다."
  19. }
  20. }
  21. });
  22. // 비밀번호 변경 처리
  23. $("#fPasswordReset").validate({
  24. onkeyup: false,
  25. onclick: false,
  26. onfocusout: false,
  27. showErrors: function (errorMap, errorList) {
  28. if (this.numberOfInvalids() && errorList.length > 0) {
  29. alert(errorList[0].message);
  30. $(errorList[0].element).focus();
  31. }
  32. },
  33. rules: {
  34. email: {required: true, email: true},
  35. password: {required: true, minlength: 8, is_password_able: true},
  36. password_confirmation: {required: true, equalTo: "#password"}
  37. },
  38. messages: {
  39. email: {
  40. required: "이메일 주소를 입력해주세요.",
  41. email: "이메일 주소가 유효하지 않습니다."
  42. },
  43. password: {
  44. required: "비밀번호를 입력해주세요.",
  45. minlength: "비밀번호는 최소 8자 이상입니다.",
  46. is_password_able: "비밀번호가 유효하지 않습니다."
  47. },
  48. password_confirmation: {
  49. required: "비밀번호를 재입력해주세요.",
  50. equalTo: '비밀번호가 서로 일치하지 않습니다.'
  51. }
  52. }
  53. });