Files
orico-officialWebsite-ts-admin/src/utils/regexp/boxCodeCtn.ts
2025-03-26 11:00:21 +08:00

10 lines
315 B
TypeScript

//只允许输入CTN开头并且CTN后面只能跟数字
export const boxCodeCtn = (target: any) => {
console.log(target.length);
return target.replace(/[^C|c|T|t|N|n]/g, "");
if ((target.length === 1 && target !== "c") || target !== "C") {
console.log("123232323");
return "";
}
};