11wqe1 преди 3 седмици
родител
ревизия
fb44559405
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/components/pages/studentManageNew/component/addstu.vue

+ 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 = '';