瀏覽代碼

上传新文件

张晓翠 2 年之前
父節點
當前提交
8d9cf36d23
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      baby-institute-admin-ui-front-master/plop-templates/utils.js

+ 9 - 0
baby-institute-admin-ui-front-master/plop-templates/utils.js

@@ -0,0 +1,9 @@
+exports.notEmpty = name => {
+  return v => {
+    if (!v || v.trim === '') {
+      return `${name} is required`
+    } else {
+      return true
+    }
+  }
+}