fix(web): change string regExp

This commit is contained in:
zhaoying
2026-03-03 10:24:21 +08:00
parent c9a8753473
commit aa7d52568b
3 changed files with 4 additions and 5 deletions

View File

@@ -45,6 +45,5 @@ export const validateSquareImage = (errorMessage: string = 'Image must be square
};
};
// - Cannot be empty or pure whitespace
// - Cannot start with a space
export const stringRegExp = /^[a-zA-Z0-9\u4e00-\u9fa5][a-zA-Z0-9\u4e00-\u9fa5\s]*$/
// - Cannot start or end with a space
export const stringRegExp = /^(?!\s).*(?<!\s)$/