Merged in fix/STAY-15-validation-messages (pull request #3203)

fix: Show correct validation errors in additionalInfoForm

* fix: Show correct validation errors in additionalInfoForm


Approved-by: Bianca Widstam
Approved-by: Erik Tiekstra
This commit is contained in:
Christel Westerberg
2025-11-24 08:36:17 +00:00
parent 8a5fef6d3a
commit 9ca7cfc0d3
3 changed files with 9 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
ref
) {
const intl = useIntl()
const { control, formState } = useFormContext()
const { control } = useFormContext()
const numberAttributes: HTMLAttributes<HTMLInputElement> = {}
if (type === "number") {
numberAttributes.onWheel = function (evt: WheelEvent<HTMLInputElement>) {
@@ -50,7 +50,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
control={control}
name={name}
rules={registerOptions}
render={({ field, fieldState }) => (
render={({ field, fieldState, formState }) => (
<TextField
aria-label={ariaLabel}
className={className}