This commit is contained in:
Josh Hawkins
2025-05-17 16:11:19 -06:00
committed by GitHub
parent ebae6cb1ed
commit 5d13925d2b
12 changed files with 45 additions and 14 deletions
@@ -119,6 +119,8 @@ export default function CreateFaceWizardDialog({
setName(name);
setStep(1);
}}
regexPattern={/^[\p{L}\p{N}\s'_-]{1,50}$/u}
regexErrorMessage={t("description.invalidName")}
>
<div className="flex justify-end py-2">
<Button variant="select" type="submit">
@@ -20,6 +20,8 @@ type TextEntryDialogProps = {
onSave: (text: string) => void;
defaultValue?: string;
allowEmpty?: boolean;
regexPattern?: RegExp;
regexErrorMessage?: string;
};
export default function TextEntryDialog({
@@ -30,6 +32,8 @@ export default function TextEntryDialog({
onSave,
defaultValue = "",
allowEmpty = false,
regexPattern,
regexErrorMessage,
}: TextEntryDialogProps) {
const { t } = useTranslation("common");
@@ -44,6 +48,8 @@ export default function TextEntryDialog({
defaultValue={defaultValue}
allowEmpty={allowEmpty}
onSave={onSave}
regexPattern={regexPattern}
regexErrorMessage={regexErrorMessage}
>
<DialogFooter className={cn("pt-4", isMobile && "gap-2")}>
<Button type="button" onClick={() => setOpen(false)}>