Commit 00f1c4a5 authored by mercury233's avatar mercury233

fix message

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