login.js 765 B

12345678910111213141516171819202122232425
  1. $('#fLogin').validate({
  2. onkeyup: false,
  3. onclick: false,
  4. onfocusout: false,
  5. showErrors: function (errorMap, errorList) {
  6. if (this.numberOfInvalids() && errorList.length > 0) {
  7. alert(errorList[0].message);
  8. $(errorList[0].element).focus();
  9. }
  10. },
  11. rules: {
  12. email: {required: true, email: true},
  13. password: {required: true, minlength: 1}
  14. },
  15. messages: {
  16. email: {
  17. required: "이메일 주소를 입력해주세요.",
  18. email: "이메일 주소가 유효하지 않습니다."
  19. },
  20. password: {
  21. required: "비밀번호를 입력해주세요.",
  22. minlength: "비밀번호는 최소 1자 이상입니다."
  23. }
  24. }
  25. });