required
속성과 함께 html5 양식 유효성 검사 사용.양식 유효성 검사 및 제출 금지
제출 버튼을 클릭하면 양식을 제출하지 않고 유효성을 검사하기 만하면됩니다.
<input type="submit" id="calculate">
<script>
$("#calculate").click(function(e) {
e.preventDefault(); // prevents validation
// do something else with form data
}
</script>
를 사용하여 이벤트를 제출합니다. – Mohammad