From fab0ba657a6ce055435c02ddb51fdc1f77f34880 Mon Sep 17 00:00:00 2001 From: -l Date: Mon, 23 Sep 2024 10:36:20 +0200 Subject: [PATCH] chore: use onBlurValidator instead of validator --- .../forms/feature-fields/NationalIdentityNumber/Examples.tsx | 4 ++-- .../Field/NationalIdentityNumber/NationalIdentityNumber.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/Examples.tsx index cc800a9ab43..5c0f3a011b2 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/Examples.tsx @@ -152,7 +152,7 @@ export const ValidationFunction = () => { ) @@ -184,7 +184,7 @@ export const ValidationExtendValidator = () => { ) diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.tsx b/packages/dnb-eufemia/src/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.tsx index a3cc7ed9d8b..c5cb8b07973 100644 --- a/packages/dnb-eufemia/src/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.tsx +++ b/packages/dnb-eufemia/src/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.tsx @@ -89,7 +89,7 @@ function NationalIdentityNumber(props: Props) { mask, width: props.width ?? 'medium', inputMode: 'numeric', - validator: validate + onBlurValidator: validate ? props.validator || dnrAndFnrValidator : undefined, exportValidators: { dnrValidator, fnrValidator },