Skip to content

Scheduling infrastructure for absolutely everyone.

Hotfix: Signup fix error not shown (#3815)

Leo Giovanettif57726dc95a9
diff --git a/packages/ui/v2/form/fields.tsx b/packages/ui/v2/form/fields.tsx
index 62e48adb653..7746a2ae829 100644
--- a/packages/ui/v2/form/fields.tsx
+++ b/packages/ui/v2/form/fields.tsx
@@ -55,25 +55,17 @@ function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
if (!hintErrors && fieldErrors && !fieldErrors.message) {
// no hints passed, field errors exist and they are custom ones
return (
- <>
- {fieldErrors?.message && (
- <div className="text-gray mt-2 flex items-center text-sm text-red-700">
- <Info className="mr-1 h-3 w-3" />
- {fieldErrors.message}
- </div>
- )}
- <div className="text-gray mt-2 flex items-center text-sm text-gray-700">
- <ul className="ml-2">
- {Object.keys(fieldErrors).map((key: string) => {
- return (
- <li key={key} className="text-blue-700">
- {t(`${fieldName}_hint_${key}`)}
- </li>
- );
- })}
- </ul>
- </div>
- </>
+ <div className="text-gray mt-2 flex items-center text-sm text-gray-700">
+ <ul className="ml-2">
+ {Object.keys(fieldErrors).map((key: string) => {
+ return (
+ <li key={key} className="text-blue-700">
+ {t(`${fieldName}_hint_${key}`)}
+ </li>
+ );
+ })}
+ </ul>
+ </div>
);
}
@@ -107,6 +99,16 @@ function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
);
}
+ // errors exist, not custom ones, just show them as is
+ if (fieldErrors) {
+ return (
+ <div className="text-gray mt-2 flex items-center text-sm text-red-700">
+ <Info className="mr-1 h-3 w-3" />
+ {fieldErrors.message}
+ </div>
+ );
+ }
+
if (!hintErrors) return null;
// hints passed, no errors exist, proceed to just show hints