|
@@ -6,25 +6,28 @@
|
|
|
<script>
|
|
|
$( function(){
|
|
|
$( "#healthForm" ).validate({
|
|
|
- rules : {
|
|
|
- temperature : {
|
|
|
- floatNum : true
|
|
|
- }
|
|
|
- },
|
|
|
+ rules : {
|
|
|
+ temperature : {
|
|
|
+ floatNum : true
|
|
|
+ }
|
|
|
+ },
|
|
|
onkeyup: function( element, event ) {
|
|
|
$( "div.error-msg" ).text( "" );
|
|
|
},
|
|
|
onfocusout: function (element) {
|
|
|
$( "div.error-msg" ).text( "" );
|
|
|
},
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ $( "div.error-msg" ).append( error );
|
|
|
+ },
|
|
|
submitHandler: function(form) {
|
|
|
var temperature = $.trim( $( "input[name='temperature']" ).val() );
|
|
|
|
|
|
if( temperature.length == 0 ) {
|
|
|
- $( "div.error-msg" ).text( "체온을 입력해주세요 (Please enter your body temperature)" );
|
|
|
+ $( "div.error-msg" ).empty().text( "체온을 입력해주세요 (Please enter your body temperature)" );
|
|
|
} else {
|
|
|
$( "#phrValue" ).val( temperature );
|
|
|
-// form.submit();
|
|
|
+ form.submit();
|
|
|
}
|
|
|
}
|
|
|
});
|