Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

Update first name validation

Dave Earleyb734d225a75b
diff --git a/frontend/src/components/common/TaxAndFeeList/index.tsx b/frontend/src/components/common/TaxAndFeeList/index.tsx
index b2c8dd467..e58447b2a 100644
--- a/frontend/src/components/common/TaxAndFeeList/index.tsx
+++ b/frontend/src/components/common/TaxAndFeeList/index.tsx
@@ -1,4 +1,4 @@
-import {Badge, Button, Group, LoadingOverlay, Menu} from "@mantine/core";
+import {Badge, Button, Group, Menu} from "@mantine/core";
import classes from './TaxAndFeeList.module.scss';
import {useGetTaxesAndFees} from "../../../queries/useGetTaxesAndFees.ts";
import {TaxAndFee, TaxAndFeeCalculationType} from "../../../types.ts";
diff --git a/frontend/src/components/modals/EditTaxOrFeeModal/index.tsx b/frontend/src/components/modals/EditTaxOrFeeModal/index.tsx
index bd9675e5d..27d012ef6 100644
--- a/frontend/src/components/modals/EditTaxOrFeeModal/index.tsx
+++ b/frontend/src/components/modals/EditTaxOrFeeModal/index.tsx
@@ -44,7 +44,7 @@ export const EditTaxOrFeeModal = ({onClose, taxOrFee}: EditTaxOrFeeModalProps) =
form.reset();
onClose();
},
- onError: (error) => formErrorHandler(form, error)
+ onError: (error: any) => formErrorHandler(form, error)
});
};
@@ -56,7 +56,7 @@ export const EditTaxOrFeeModal = ({onClose, taxOrFee}: EditTaxOrFeeModalProps) =
fullWidth
loading={updateMutation.isLoading}
type={'submit'}>
- <Trans>Edit {form.values.type === TaxAndFeeType.Tax ? t`Tax` : t`Fee`}</Trans>
+ <Trans>Update {form.values.type === TaxAndFeeType.Tax ? t`Tax` : t`Fee`}</Trans>
</Button>
</form>
</Modal>
diff --git a/frontend/src/components/routes/auth/AcceptInvitation/index.tsx b/frontend/src/components/routes/auth/AcceptInvitation/index.tsx
index 00a961c63..707714578 100644
--- a/frontend/src/components/routes/auth/AcceptInvitation/index.tsx
+++ b/frontend/src/components/routes/auth/AcceptInvitation/index.tsx
@@ -25,6 +25,7 @@ const AcceptInvitation = () => {
terms: false,
},
validate: {
+ first_name: hasLength({min: 1, max: 50}, t`First name must be between 1 and 50 characters`),
password: hasLength({min: 8}, t`Password must be a minimum of 8 characters`),
password_confirmation: matchesField('password', t`Passwords are not the same`),
email: isEmail(t`Please check your email is valid`),
diff --git a/frontend/src/hooks/useFormErrorResponseHandler.tsx b/frontend/src/hooks/useFormErrorResponseHandler.tsx
index c1b9a831a..6873643f4 100644
--- a/frontend/src/hooks/useFormErrorResponseHandler.tsx
+++ b/frontend/src/hooks/useFormErrorResponseHandler.tsx
@@ -14,7 +14,7 @@ type ErrorResponse = {
export const useFormErrorResponseHandler = () => {
return (
form: UseFormReturnType<any>,
- error: ErrorResponse,
+ error: ErrorResponse | any,
errorMessage = t`Please check the provided information is correct`
) => {
if (error?.response?.data?.errors) {