Last name validation error for users with single word full name
Summary
The regular sign up form accepts only full name
.
There is a getter set for first_name
and last_name
in GL.com: https://gitlab.com/gitlab-org/gitlab/blob/master/app/models/user.rb#L915
However, if a user enters only single word in full_name
, for e.g. full_name
= Aishwarya, then the getter method for last_name
would return an empty string: https://gitlab.com/gitlab-org/gitlab/blob/master/app/models/user.rb#L921
If this user tries to apply trial using the new trial sign in flow, the user would get the error Last name can't be blank
.
This happens as Last name is mandatory in Customer
model.
Solution
User profile settings | Suggested update |
---|---|
Steps to reproduce
- Sign up using regular sign up, enter only single word for full_name
- Sign out
- Use same account to sign in using Trial sign in flow -
<app-url>/-/trial_registrations/new
- Enter Company details, click Submit
- The form throws error: Last name can't be blank
- User has no way to enter Last name
What is the expected correct behavior?
Find an appropriate way to fill in last_name
, when full name was previously entered as a single word.
Examples
Internal links: