$emails */ class InviteUserRequest extends Request { /** * @return array */ public function rules(): array { return [ 'emails.*' => 'required|email|unique:users,email', 'is_admin' => 'sometimes', ]; } /** * @return array */ public function messages(): array { return [ 'emails.*.unique' => 'The email :input is already registered.', ]; } }