generic and custom per-field validation

This commit is contained in:
Josh Hawkins
2026-02-27 09:37:57 -06:00
parent f7cc87e8ce
commit dd0c497fd3
3 changed files with 130 additions and 18 deletions
@@ -68,7 +68,11 @@ export function ConfigForm({
formContext,
i18nNamespace,
}: ConfigFormProps) {
const { t } = useTranslation([i18nNamespace || "common", "views/settings"]);
const { t } = useTranslation([
i18nNamespace || "common",
"views/settings",
"validation",
]);
const [showAdvanced, setShowAdvanced] = useState(false);
// Determine which fields to hide based on advanced toggle
@@ -113,7 +117,7 @@ export function ConfigForm({
);
// Create error transformer for user-friendly error messages
const errorTransformer = useMemo(() => createErrorTransformer(), []);
const errorTransformer = useMemo(() => createErrorTransformer(t), [t]);
const handleChange = useCallback(
(e: IChangeEvent) => {