修复issues:I9H065,创建c语言项目,作者支持空格

This commit is contained in:
zhangyun 2024-04-16 11:35:57 +08:00
parent 0dd20a3361
commit 2b5f920cec
3 changed files with 3 additions and 3 deletions

View File

@ -346,7 +346,7 @@
"CreateQtWidgetsTemplate": "Create Qt Widgets Application Project",
"errorEmpty": "Can't be empty!",
"error": "illegal!",
"errorAuthor": "Author is illegal!2-128,Only Chinese characters, numbers, letters, hyphen and underline ...",
"errorAuthor": "Author is illegal!2-128,Only Chinese characters, numbers, spaces, letters, hyphen and underline ...",
"errorEmail": "Email is illegal!",
"errorLibrary": "Library is illegal!",
"errorRunfileName": "Run file name is illegal",

View File

@ -345,7 +345,7 @@
"extension.project.noprojectidefile": "没有项目标识文件",
"CreateQtConsoleTemplate": "创建 Qt 控制台应用项目",
"CreateQtWidgetsTemplate": "创建 Qt 桌面应用项目",
"errorAuthor": "作者格式错误最长128必须由中文、字母、数字、中横线、下划线等组成",
"errorAuthor": "作者格式错误最长128必须由中文、字母、空格、数字、中横线、下划线等组成",
"errorEmpty": "不能为空",
"errorEmail": "电子邮件格式错误!",
"errorLibrary": "扩展链接库最长1024必须由字母、数字、中横线、下划线组成支持以空格间隔。",

View File

@ -306,7 +306,7 @@ const byteLength = (str) => {
const isAuthor = (author) => {
let len = byteLength(author);
if (len >= 1 && len <= 128) {
var patt = /^[\w-\.\u4e00-\u9fa5]{1,128}$/;
var patt = /^[\w-\s-\.\u4e00-\u9fa5]{1,128}$/;
return patt.test(author);;
} else {
return false;