mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 21:11:53 +00:00
fix: showing the error for company name when try to sign up
This commit is contained in:
@@ -71,7 +71,6 @@ export const AuthForm = ({ type }: { type: string }) => {
|
||||
if (newUser?.errors && newUser.errors.length > 0) {
|
||||
newUser.errors.forEach((error: ApiError) => {
|
||||
const errorMessage = error.detail;
|
||||
|
||||
switch (error.source.pointer) {
|
||||
case "/data/attributes/name":
|
||||
form.setError("name", { type: "server", message: errorMessage });
|
||||
@@ -79,6 +78,12 @@ export const AuthForm = ({ type }: { type: string }) => {
|
||||
case "/data/attributes/email":
|
||||
form.setError("email", { type: "server", message: errorMessage });
|
||||
break;
|
||||
case "/data/attributes/company_name":
|
||||
form.setError("company", {
|
||||
type: "server",
|
||||
message: errorMessage,
|
||||
});
|
||||
break;
|
||||
case "/data/attributes/password":
|
||||
form.setError("password", {
|
||||
type: "server",
|
||||
|
||||
Reference in New Issue
Block a user