update registration failure message (#179)

This commit is contained in:
Zainab Amir
2021-03-08 16:02:06 +05:00
committed by GitHub
parent 66e6687067
commit a0a020fc2f

View File

@@ -28,8 +28,9 @@ const RegistrationFailureMessage = (props) => {
userErrors.push(serverError);
break;
default:
Object.keys(errorMessage).forEach((key) => {
default:
Object.keys(errorMessage).forEach((key) => {
if (key !== 'error_code') {
const errors = errorMessage[key];
const suppressionClass = ['email', 'username'].includes(key) ? 'data-hj-suppress' : '';
const errorList = errors.map((error) => (
@@ -40,7 +41,8 @@ const RegistrationFailureMessage = (props) => {
) : null
));
userErrors.push(errorList);
});
}
});
}
return (