Merge branch 'main' into next

This commit is contained in:
nocobase[bot]
2025-09-16 08:08:04 +00:00
4 changed files with 3 additions and 4 deletions
@@ -19,7 +19,6 @@ describe('base-auth', () => {
expect(auth.validateUsername('')).toBe(false);
expect(auth.validateUsername('a@')).toBe(false);
expect(auth.validateUsername('a.')).toBe(false);
expect(auth.validateUsername('a<')).toBe(false);
expect(auth.validateUsername('a>')).toBe(false);
expect(auth.validateUsername('a"')).toBe(false);
+1 -1
View File
@@ -67,7 +67,7 @@ export class BaseAuth extends Auth {
* @internal
*/
validateUsername(username: string) {
return /^[^@.<>"'/]{1,50}$/.test(username);
return /^[^@<>"'/]{1,50}$/.test(username);
}
async checkToken(): Promise<{
@@ -32,7 +32,7 @@ const isValidateEmpty = (value: any) => {
registerValidateRules({
username(value) {
return /^[^@.<>"'/]{1,50}$/.test(value) || i18n.t('Must be 1-50 characters in length (excluding @.<>"\'/)');
return /^[^@<>"'/]{1,50}$/.test(value) || i18n.t('Must be 1-50 characters in length (excluding @<>"\'/)');
},
required(value, rule) {
if (rule.required === false) return '';
@@ -56,7 +56,7 @@ const getPasswordForm = ({ showForgotPassword }: { showForgotPassword?: boolean
return t("Please enter a valid email");
}
} else {
return /^[^@.<>"'/]{1,50}$/.test(value) || t("Please enter a valid username");
return /^[^@<>"'/]{1,50}$/.test(value) || t("Please enter a valid username");
}
}}}`,
'x-decorator': 'FormItem',