Wichige änderung an DB

This commit is contained in:
Timo Knuth
2025-11-05 12:02:59 +01:00
parent 2f0208ebf9
commit f31992b952
37 changed files with 2774 additions and 2596 deletions

View File

@@ -7,7 +7,17 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
}
export const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, label, error, ...props }, ref) => {
({ className, type, label, error, onInvalid, ...props }, ref) => {
// Default English validation message
const handleInvalid = (e: React.InvalidEvent<HTMLInputElement>) => {
e.target.setCustomValidity('Please fill out this field.');
if (onInvalid) onInvalid(e);
};
const handleInput = (e: React.FormEvent<HTMLInputElement>) => {
e.currentTarget.setCustomValidity('');
};
return (
<div className="space-y-1">
{label && (
@@ -23,6 +33,8 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
className
)}
ref={ref}
onInvalid={handleInvalid}
onInput={handleInput}
{...props}
/>
{error && (