|
@@ -6,19 +6,27 @@
|
|
|
<script>
|
|
|
$.validator.addMethod( "rangePulseRate", function( value, element ) {
|
|
|
var result = true;
|
|
|
- if( value > 999 || value < 0 ) {
|
|
|
+ if( value > 200 || value < 30 ) {
|
|
|
result = false;
|
|
|
}
|
|
|
return this.optional(element) || result;
|
|
|
-}, "맥박수는 [0 ~ 999] 사이의 숫자만 입력해주세요" );
|
|
|
+}, "맥박수는 [30 ~ 200] 사이의 숫자만 입력해주세요" );
|
|
|
|
|
|
-$.validator.addMethod( "rangeBloodPressure", function( value, element ) {
|
|
|
+$.validator.addMethod( "rangeBloodPressure1", function( value, element ) {
|
|
|
var result = true;
|
|
|
- if( value > 999 || value < 0 ) {
|
|
|
+ if( value > 250 || value < 50 ) {
|
|
|
result = false;
|
|
|
}
|
|
|
return this.optional(element) || result;
|
|
|
-}, "혈압은 [0 ~ 999] 사이의 숫자만 입력해주세요" );
|
|
|
+}, "수축기 혈압은 [50 ~ 250] 사이의 숫자만 입력해주세요" );
|
|
|
+
|
|
|
+$.validator.addMethod( "rangeBloodPressure2", function( value, element ) {
|
|
|
+ var result = true;
|
|
|
+ if( value > 160 || value < 20 ) {
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ return this.optional(element) || result;
|
|
|
+}, "이완기 혈압은 [20 ~ 160] 사이의 숫자만 입력해주세요" );
|
|
|
|
|
|
$( function(){
|
|
|
$( "#healthForm" ).validate({
|
|
@@ -31,12 +39,12 @@ $( function(){
|
|
|
bloodPressure : {
|
|
|
floatNum : true,
|
|
|
floatNumOne : true,
|
|
|
- rangeBloodPressure : true
|
|
|
+ rangeBloodPressure1 : true
|
|
|
},
|
|
|
bloodPressure2 : {
|
|
|
floatNum : true,
|
|
|
floatNumOne : true,
|
|
|
- rangeBloodPressure : true
|
|
|
+ rangeBloodPressure2 : true
|
|
|
}
|
|
|
},
|
|
|
onkeyup: function( element, event ) {
|