Skip to content
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

Stop submit if empty without required #116

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Stop submit if empty without required #116

wants to merge 3 commits into from

Conversation

kingsj0405
Copy link
Member

스택오버플로우 글에서 textarea가 required를 체크할 때 hide되어 있는 것이 문제라고 해서 코드를 보니까 다음과 같이 되어 있습니다.

...
<label for="exampleInputPassword1">
                	내용 (<a href="/page/md_manual" target="_blank">서식 도움말</a>)
								</label>
<textarea name="content" class="form-control" rows="20" required="" style="display: none;"></textarea>
<div class="CodeMirror cm-s-default CodeMirror-wrap">
...

CodeMirror 이슈에서 CodeMirror Maintainer가 이 이슈는 포기한 걸 보고 workaround로 해결했습니다.

The main problem is textarea is hide when check required content.
But codemirror don't have robust solution about that and give up.
So I check empty content without required as wordaround.
@@ -66,5 +66,10 @@
.val(editor.getValue());
}
)
$('form').submit(function(e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인덴트 확인좀여

@hellodhlyn
Copy link
Member

#113

@kingsj0405
Copy link
Member Author

일단 코드리뷰는 수정했는데 린트 저렇게 빡센 거 실화인가요...
너무 빡세다고 찡찡대는 이슈도 있는데 시간이 지나면 테스트 통과하지 않을까하는 안이한 생각도 들고...

@kingsj0405
Copy link
Member Author

수정완료

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants