I'm having a problem in change password condition, when I type the same passwords in New Password and Retype Password, the message below is still appearing, "The two passwords that you entered do not match!" even thought it is the same.
<FormItemInput
intlMessageLabel='Portal.topbar.newPassword'
name='newPassword'
required={true}
intlMessage='Portal.password.required'
minLength={7}
messageLength='Portalform.password.length'
inputType='password'
/>
<div><IntlMessages id="Portal.retypePassword" /></div>
<Form.Item
name='retypePassword'
dependencies={['password']}
rules={[
{
min: 7,
message: <IntlMessages id="Portal.retypePassword.length" />,
},
{
required: true,
message: <IntlMessages id="Portal.corpMerchant.portalUser.addUser.form.retypePassword.required" />,
},
({ getFieldValue }) => ({
validator(rule, value) {
if (!value || getFieldValue('password') === value) {
return Promise.resolve();
}
if (value.length < 7) {
return Promise.reject();
}
return Promise.reject(
<IntlMessages id="Portal.retypePassword.notMatch" />
);
},
}),
]}
hasFeedback
>
<Input.Password
maxLength={32}
size="large"
style={{ textAlign: 'left' }}
/>
</Form.Item>