Skip to content
Snippets Groups Projects
Unverified Commit fefe02c2 authored by Bruno Quaresma's avatar Bruno Quaresma Committed by GitHub
Browse files

fix(site): fix group name validation (#10739)

parent 9f3a955e
No related branches found
No related tags found
No related merge requests found
......@@ -7,15 +7,11 @@ import { Stack } from "components/Stack/Stack";
import { useFormik } from "formik";
import { FC } from "react";
import { useNavigate } from "react-router-dom";
import {
getFormHelpers,
nameValidator,
onChangeTrimmed,
} from "utils/formUtils";
import { getFormHelpers, onChangeTrimmed } from "utils/formUtils";
import * as Yup from "yup";
const validationSchema = Yup.object({
name: nameValidator("Name"),
name: Yup.string().required().label("Name"),
});
export type CreateGroupPageViewProps = {
......@@ -50,8 +46,6 @@ export const CreateGroupPageView: FC<CreateGroupPageViewProps> = ({
<Stack spacing={2.5}>
<TextField
{...getFieldHelpers("name")}
onChange={onChangeTrimmed(form)}
autoComplete="name"
autoFocus
fullWidth
label="Name"
......@@ -61,8 +55,6 @@ export const CreateGroupPageView: FC<CreateGroupPageViewProps> = ({
"display_name",
"Optional: keep empty to default to the name.",
)}
autoComplete="display_name"
autoFocus
fullWidth
label="Display Name"
/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment