11wqe1 1 gün önce
ebeveyn
işleme
fb44559405

+ 2 - 2
src/components/pages/studentManageNew/component/addstu.vue

@@ -473,7 +473,7 @@ export default {
                 _this.org &&
                 _this.schoolChar
               ) {
-                if (accountVal) {
+                if (accountVal && /^[a-zA-Z0-9]+$/.test(accountVal)) {
                   obj.account = accountVal + '@' + _this.schoolChar + '.' + _this.userSuffix;
                 } else {
                   obj.account = '';
@@ -482,7 +482,7 @@ export default {
                 obj.mail =
                   uuidv4() + "@" + _this.schoolChar + "." + _this.userSuffix;
               } else {
-                if (accountVal) {
+                if (accountVal && /^[a-zA-Z0-9]+$/.test(accountVal)) {
                   obj.account = accountVal + '@' + _this.userSuffix;
                 } else {
                   obj.account = '';