"use client"; import { Field, TextInput } from "@/components/ui"; import type { QrFormProps } from "@/components/qr-forms/types"; export function WebsiteForm({ value, onChange, error, disabled }: QrFormProps) { const url = typeof value.url === "string" ? value.url : ""; // Häufigster Eingabefehler: die Adresse wird ohne Schema getippt. const missingScheme = url.trim().length > 0 && !/^[a-z][a-z0-9+.-]*:/i.test(url); return (
onChange({ ...value, url: event.target.value })} /> {missingScheme ? ( ) : null}
); }