+tests for utils, fix UNAME_RE

This commit is contained in:
undefined committed 2020-08-11 00:09:44 +08:00
1 parent 54a57d3ca9
commit d01034bca8
5 files changed
+187 -4

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ import { ValidationError } from '../error';
const RE_UID = /^-?\d+$/i;
const RE_PID = /^[a-zA-Z]+[a-zA-Z0-9]*$/i;
const RE_UNAME = /[^\s\u3000](.{,254}[^\s\u3000])?$/i;
const RE_UNAME = /^.{3,254}$/i;
const RE_ROLE = /^[_0-9A-Za-z]{1,256}$/i;
const RE_MAIL = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$/i;