Ошибка при регистрации, если отсутствует код приглашения

It took me quite a while to sign up a new test user on my forum yesterday because I forgot to enter the invite code.

The error message that was shown wasn’t very helpful:

Something went wrong, perhaps this email is already registered, try the forgot password link

No matter which email I tried, the error was the same.

Would it be possible to display an error for the invite code field like when a required custom field is empty?


Maybe it would also be helpful to add an asterisk after “invite code,” since it is required too.

3 лайка

I tested this again as there have been a lot of changes to the sign-up dialog in the past months. The error message shown when the invite code is missing is still the same.

I think an error message, “Please enter invite code,” below the invite code field, similar to the ones shown below the email, username, password, and custom user fields, would be helpful.

Thanks @Moin, you’re right that this error could be improved. I’ve opened a request with our team to fix this up. At this point, I don’t have an estimate for when this work might be complete based on the team’s other priorities.

3 лайка

I think the only thing needed as a fix is to change the error message into “You did not enter the invite code” .

After all, when I look at the source, the only flow where this message will be shown is when the invite code is set, and not submitted. All other account registration errors return a custom error message.

When an email address is already registered, no message will be shown at all, and an email will be sent to that email address.

Я не думаю, что это верно, если настройка сайта «Скрыть занятость адреса электронной почты» отключена. Но я согласен с вами, что в этом случае не показывается ошибка о том, что email может быть уже зарегистрирован. Интересно, почему. В данном случае, по-видимому, должно отображаться корректное сообщение.

Из-за Make reason for 'error moving posts' visible in the interface - #2 by zogstrip я подумал, что имеет смысл проверить сетевой ответ и в этом случае, и вуаля: errors: [ "param is missing or the value is empty or invalid: invite_code" ] — ошибка тоже там.

Так что, возможно, отображаемую ошибку можно улучшить аналогичным образом. Хотя была бы полезна и валидация поля на стороне фронтенда, как у всех остальных полей.

1 лайк