Skip to content

Last name is required on registration, and I think it shouldn't #592

@mariavilaro

Description

@mariavilaro

When using the registration component, the last_name field is required:

Validator::make($input, [
    'first_name' => ['required', 'string', 'max:255'],
    'last_name' => ['required', 'string', 'max:255'],
    ...

But it's not required in the user model rules:

public $rules = [
    'first_name' => ['required', 'string', 'max:255'],
    'email' => ['required', 'between:3,255', 'email', 'unique:users,email,NULL,id,is_guest,false'],
    'username' => ['required', 'between:2,255', 'unique:users,username,NULL,id,is_guest,false'],
    'password' => ['required:create', 'string', 'confirmed'],
    'avatar' => ['nullable', 'image', 'max:4000'],
];

It's not needed neither in the backend user edition, and in the Readme file it says that the last name is not required. So I think that the registration component shouldn't require it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions