原材料入库

This commit is contained in:
2026-05-15 11:34:12 +08:00
parent f5ba828eff
commit 70dced7d2c
1700 changed files with 24156 additions and 33 deletions

View File

@@ -0,0 +1 @@
function p(s,a){if(/^[0-9]/.test(s))return{passed:!1,message:"不能以数字开头"};const{allowDot:n=!1}=a!=null?a:{};if(n){if(/^\./.test(s))return{passed:!1,message:"不能以小数点开头"};if(/\.$/.test(s))return{passed:!1,message:"不能以小数点结尾"};if(/\.{2}/.test(s))return{passed:!1,message:"不能连续出现小数点"}}let e="a-zA-Z_\\u4e00-\\u9fa5",t=["字母","数字","下划线","中文"];n&&(e+="\\.",t.splice(3,0,"小数点"),e+="\\[\\]",t.splice(3,0,"英文中括号"));const r=`^[${e}][0-9${e}]*$`;return new RegExp(r).test(s)?{passed:!0,message:""}:{passed:!1,message:"只能包含"+t.join("")}}export{p as f};