Merge pull request #539 from RickCole21/master

修复字符串形式配置正则时异常
This commit is contained in:
liaoxuezhi 2020-04-09 15:04:18 +08:00 committed by GitHub
commit 151709cbf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ export function str2rules(
if (~idx) {
validateMethod = validation.substring(0, idx);
args = /^matchRegexp/.test(validateMethod)
? [validation]
? [validation.substring(idx + 1).trim()]
: validation
.substring(idx + 1)
.split(',')