fix
Some checks failed
Docker image / build-and-push-image (push) Has been cancelled

This commit is contained in:
Your Name 2024-11-22 14:09:52 -07:00
parent 4503027266
commit 44dc7bb615

View File

@ -74,8 +74,14 @@ const MetadataForm = ({ defaultValues, onSubmit }: MetadataFormProps) => {
autoComplete="off"
isDisabled={isSubmitting}
{...register("displayName", {
minLength: 2,
maxLength: 64,
minLength: {
value: 2,
message: "Must be at least 2 characters long",
},
maxLength: {
value: 64,
message: "Cannot exceed 64 characters",
}
})}
/>
<FormErrorMessage>{errors.displayName?.message}</FormErrorMessage>
@ -86,10 +92,19 @@ const MetadataForm = ({ defaultValues, onSubmit }: MetadataFormProps) => {
autoComplete="off"
isDisabled={isSubmitting}
{...register("username", {
minLength: 2,
maxLength: 64,
required: true,
pattern: /^[a-zA-Z0-9_-]{4,64}$/,
minLength: {
value: 2,
message: "Must be at least 2 characters long",
},
maxLength: {
value: 64,
message: "Cannot exceed 64 characters",
},
required: "Username is required",
pattern: {
value: /^[a-zA-Z0-9_-]{2,64}$/,
message: "Only letters, numbers, underscores, and hyphens, and must be 2-64 characters",
},
})}
/>
<FormErrorMessage>{errors.username?.message}</FormErrorMessage>