Explorar el Código

上传新文件

张晓翠 hace 2 años
padre
commit
8d9cf36d23
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  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
+    }
+  }
+}