Commit ffe2da56 authored by mercury233's avatar mercury233

test fix intl

parent 53e757ee
...@@ -34,7 +34,7 @@ class EmailForm extends React.Component { ...@@ -34,7 +34,7 @@ class EmailForm extends React.Component {
checkPassword = (rule, value, callback) => { checkPassword = (rule, value, callback) => {
const form = this.props.form; const form = this.props.form;
const { intl: { messages } } = this.context; //const { intl: { messages } } = this.context;
if (value && value !== form.getFieldValue('new_password')) { if (value && value !== form.getFieldValue('new_password')) {
callback(messages['Incorrect-password.2']); callback(messages['Incorrect-password.2']);
} else { } else {
......
...@@ -36,7 +36,8 @@ class Register extends React.Component { ...@@ -36,7 +36,8 @@ class Register extends React.Component {
checkPassword = (rule, value, callback) => { checkPassword = (rule, value, callback) => {
const form = this.props.form; const form = this.props.form;
if (value && value !== form.getFieldValue('password')) { if (value && value !== form.getFieldValue('password')) {
callback(this.context.intl.messages['Incorrect-password.2']); // callback(this.context.intl.messages['Incorrect-password.2']);
callback(messages['Incorrect-password.2']);
} else { } else {
callback(); callback();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment