diff --git a/app/config/rules.ts b/app/config/rules.ts index 771310b2..baa83422 100644 --- a/app/config/rules.ts +++ b/app/config/rules.ts @@ -1,42 +1,42 @@ import { POSITIVE_INTEGER_REGEX } from '@app/utils/constant'; +import intl from 'react-intl-universal'; -export const hostRulesFn = intl => [ +export const hostRulesFn = () => [ { required: true, message: intl.get('formRules.hostRequired'), }, ]; -export const usernameRulesFn = intl => [ +export const usernameRulesFn = () => [ { required: true, message: intl.get('formRules.usernameRequired'), }, ]; -export const passwordRulesFn = intl => [ +export const passwordRulesFn = () => [ { required: true, message: intl.get('formRules.passwordRequired'), }, ]; - -export const nameRulesFn = intl => [ +export const nameRulesFn = () => [ { required: true, message: intl.get('formRules.nameRequired'), }, ]; -export const numberRulesFn = intl => [ +export const numberRulesFn = () => [ { pattern: POSITIVE_INTEGER_REGEX, message: intl.get('formRules.numberRequired'), }, ]; -export const replicaRulesFn = (intl, activeMachineNum) => [ +export const replicaRulesFn = (activeMachineNum) => [ { pattern: POSITIVE_INTEGER_REGEX, message: intl.get('formRules.numberRequired'), diff --git a/app/pages/Login/index.tsx b/app/pages/Login/index.tsx index 7fafc10e..a6d97bd2 100644 --- a/app/pages/Login/index.tsx +++ b/app/pages/Login/index.tsx @@ -49,13 +49,13 @@ const LoginPage: React.FC = () => { {intl.get('configServer.title')} - + - + - +