Skip to content

Commit

Permalink
feat: liste-diffusion campagne name control
Browse files Browse the repository at this point in the history
  • Loading branch information
kevbarns committed Dec 13, 2024
1 parent 3a54351 commit b3ed8ba
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,16 @@ const ChoixSource: FC<Props> = ({ mailingList, onSuccess }) => {
state={errors.campaign_name ? "error" : "default"}
stateRelatedMessage={errors.campaign_name?.message}
nativeInputProps={{
placeholder: "Campagne voeux 2023",
placeholder: "Campagne_voeux",
...register("campaign_name", {
required: "Veuillez saisir le nom de la campagne",
validate: {
regex: (value) => {
if (!/^[A-Za-z0-9 _-]*$/.test(value)) {
return "Le nom doit contenir uniquement lettres, chiffres, tirets (-) et underscores (_), sans espaces.";
}
},
},
}),
}}
/>
Expand Down

0 comments on commit b3ed8ba

Please sign in to comment.