2025-03-26
This commit is contained in:
9
src/utils/regexp/boxCodeCtn.ts
Normal file
9
src/utils/regexp/boxCodeCtn.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
//只允许输入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 "";
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user