Commit 00f1c4a5 authored by mercury233's avatar mercury233

fix message

parent ffe2da56
......@@ -33,7 +33,7 @@ class EmailForm extends React.Component {
};
checkPassword = (rule, value, callback) => {
const form = this.props.form;
const { form, messages } = this.props;
//const { intl: { messages } } = this.context;
if (value && value !== form.getFieldValue('new_password')) {
callback(messages['Incorrect-password.2']);
......
......@@ -34,7 +34,7 @@ class Register extends React.Component {
checkPassword = (rule, value, callback) => {
const form = this.props.form;
const { form, messages } = this.props;
if (value && value !== form.getFieldValue('password')) {
// callback(this.context.intl.messages['Incorrect-password.2']);
callback(messages['Incorrect-password.2']);
......
......@@ -30,9 +30,9 @@ class Reset extends React.Component {
};
checkPassword = (rule, value, callback) => {
const form = this.props.form;
const { form, messages } = this.props;
if (value && value !== form.getFieldValue('password')) {
callback('Two passwords that you enter is inconsistent!');
callback(messages['Incorrect-password.2']);
} else {
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