Skip to content

Commit

Permalink
fix(yup): 修复 webpack 报警告问题
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Jun 28, 2020
1 parent d00abef commit 2e03e0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validator/yup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Object.defineProperty(yup, 'printValue', {

// 实现 chineseMobilePhoneNumber 验证器
yup.addMethod(yup.string, 'chineseMobilePhoneNumber', function (
message: yup.LocaleValue = yup.getLocale().string.chineseMobilePhoneNumber,
message: yup.LocaleValue = locale.string.chineseMobilePhoneNumber,
) {
return this.test(
'chineseMobilePhoneNumber',
Expand All @@ -35,7 +35,7 @@ yup.addMethod(yup.string, 'chineseMobilePhoneNumber', function (

// 实现 chineseIDCardNumber 验证器
yup.addMethod(yup.string, 'chineseIDCardNumber', function (
message: yup.LocaleValue = yup.getLocale().string.chineseIDCardNumber,
message: yup.LocaleValue = locale.string.chineseIDCardNumber,
) {
return this.test('chineseIDCardNumber', message, isChineseIDCardNumber)
})
Expand Down

0 comments on commit 2e03e0c

Please sign in to comment.