소스 검색

Add red border to invalid fields for recipes

Lee Morgan 6 년 전
부모
커밋
750ed522e4
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      views/merchantSetupPage/recipeSetup.js

+ 2 - 0
views/merchantSetupPage/recipeSetup.js

@@ -54,6 +54,7 @@ let recipeSetup = {
             ingQuant.type = "number";
             ingQuant.step = "0.01";
             ingQuant.value = ing.quantity;
+            ingQuant.onblur = ()=>{checkValid("quantity", ingQuant.value)};
             quantTd.appendChild(ingQuant);
         }
     
@@ -166,6 +167,7 @@ let recipeSetup = {
         ingQuant.type = "number";
         ingQuant.step = "0.01";
         ingQuant.min = "0";
+        ingQuant.onblur = ()=>{checkValid("quantity", ingQuant.value)};
         quantTd.appendChild(ingQuant);
     
         let removeTd = document.createElement("td");