-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[모수진] Sprint4 #69
The head ref may contain hidden characters: "Basic-\uBAA8\uC218\uC9C4-sprint4"
[모수진] Sprint4 #69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수진님 이번주도 고생많으셨습니다 :)
// todo: print error message | ||
} | ||
else if(pwdValue.length < 8 ) { | ||
event.target.style.border='1px solid var(--red)'; //todo: print error message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate 구현 1)
이렇게 validate 가 실패했을때 보통 하단에 보이지 않는 div 등을 추가해주었다가, error 가 생기면 그때 diaplay 를 보여지도록 변경하고 에러 메시지를 content 를 넣어주고! 그런형태로 해보시면 됩니다 :) 안되면 멘토링시간에 한 번 더 질문해주세요!
event.target.style.border='0'; | ||
} | ||
}) | ||
pwdConfirmForm.addEventListener("focusout",(event) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
focus out 보다는 blur 를 더 많이 사용하는것 같아요!
@@ -60,7 +60,7 @@ header { | |||
display: flex; | |||
justify-content: center; | |||
} | |||
.top-con{ | |||
.top-container { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
적절하게 네이밍을 잘 변경해주셨군요 :) 좋습니다.
const emailForm = document.getElementById("email"); | ||
const pwdForm = document.getElementById("password"); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
login, signup 둘 다 focus out 일때 로직을 잘 작성해주셨어요!
하지만 항상 우리 form 의 꽃은 submit 입니다! 다음번에는 submit event 를 핸들링하는 함수를 꼭 작성해봅시다 :)
id="passwordConfirmation" | ||
name="passwordConfirmation" | ||
id="passwordConfirm" | ||
name="passwordConfirm" | ||
type="password" | ||
placeholder="비밀번호를 다시 한 번 입력해 주세요" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate 구현 2)
여기 input 하단에 display가 none 인 div,span 을 숨겨두는거죠.
const nickForm = document.getElementById("nickname"); | ||
const pwdForm = document.getElementById("password"); | ||
const pwdConfirmForm = document.getElementById("passwordConfirm"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기에서 button 도 불러와서 button 의 disabled 속성을 validate 에 따라 변경해주면 button 도 금방 disable 처리 할 수 있겠죠?
요구사항
기본
로그인
회원가입
심화
주요 변경사항
스크린샷
멘토에게