From 8ee7e00b40c9fa548bb1204effc10e76b7df9ff6 Mon Sep 17 00:00:00 2001 From: iron <472263356@qq.com> Date: Mon, 27 Sep 2021 16:10:29 +0800 Subject: [PATCH] fix: ProFormFieldSet validator params error (#9136) --- src/pages/account/settings/components/base.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/account/settings/components/base.tsx b/src/pages/account/settings/components/base.tsx index 88e3ebb7..9900c41a 100644 --- a/src/pages/account/settings/components/base.tsx +++ b/src/pages/account/settings/components/base.tsx @@ -14,12 +14,11 @@ import { queryProvince, queryCity } from '../service'; import styles from './BaseView.less'; -const validatorPhone = (rule: any, value: string, callback: (message?: string) => void) => { - const values = value.split('-'); - if (!values[0]) { +const validatorPhone = (rule: any, value: string[], callback: (message?: string) => void) => { + if (!value[0]) { callback('Please input your area code!'); } - if (!values[1]) { + if (!value[1]) { callback('Please input your phone number!'); } callback();