提交 f11396c3 编写于 作者: huangwensu's avatar huangwensu

自动填充名称

上级 a191576c
...@@ -125,6 +125,7 @@ html,body{ ...@@ -125,6 +125,7 @@ html,body{
.screenSet{ .screenSet{
// width: 163vh !important; // width: 163vh !important;
// height: 66vh !important; // height: 66vh !important;
height: 430px !important;
margin: 88px 30px 0px; margin: 88px 30px 0px;
overflow: auto; overflow: auto;
} }
...@@ -133,6 +134,7 @@ html,body{ ...@@ -133,6 +134,7 @@ html,body{
.screenSet{ .screenSet{
// width: 166vh !important; // width: 166vh !important;
// height: 78vh !important; // height: 78vh !important;
height: 800px !important;
overflow: auto; overflow: auto;
margin: 88px 30px 0px; margin: 88px 30px 0px;
} }
......
...@@ -31,7 +31,7 @@ export function isvalidUsername(str) { ...@@ -31,7 +31,7 @@ export function isvalidUsername(str) {
return reg.test(str) return reg.test(str)
} }
// 2-150个字符 // 2-150个中英文字符
export function validateWord150(rule, value, callback, message) { export function validateWord150(rule, value, callback, message) {
if(!/^[\u4e00-\u9fffa-zA-Z]{2,150}$/.test(value)) { if(!/^[\u4e00-\u9fffa-zA-Z]{2,150}$/.test(value)) {
callback(new Error(message)) callback(new Error(message))
...@@ -39,6 +39,14 @@ export function isvalidUsername(str) { ...@@ -39,6 +39,14 @@ export function isvalidUsername(str) {
callback() callback()
} }
} }
// 考试30个中英文字符
export function validateWord30(value,message) {
if(!/^[\u4e00-\u9fffa-zA-Z]{0,30}$/.test(value)) {
callback(new Error('考试名称长度不超过30个中文字符长度'))
} else {
callback()
}
}
/* 通用密码验证(数字、字母、下划线或特殊字符且长度为0-150位) */ /* 通用密码验证(数字、字母、下划线或特殊字符且长度为0-150位) */
export function isValidPassword(rule, value, callback, message) { export function isValidPassword(rule, value, callback, message) {
if (!/^(?:\d+|[a-zA-Z]+|[!@#$%^&*]+){0,150}$/.test(value)) { if (!/^(?:\d+|[a-zA-Z]+|[!@#$%^&*]+){0,150}$/.test(value)) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册