From 234d060101d9d73c1babc89b11588c545f44c97d Mon Sep 17 00:00:00 2001 From: Dimo Dimov <961014+dimodi@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:30:05 +0200 Subject: [PATCH 1/4] docs(form): Enhance information about EditContext creation --- components/form/overview.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/form/overview.md b/components/form/overview.md index 27b7f7b406..d6fcb52f60 100644 --- a/components/form/overview.md +++ b/components/form/overview.md @@ -16,7 +16,9 @@ The From 866e9d90e93d9969d4159b6f084495c4379b2877 Mon Sep 17 00:00:00 2001 From: Dimo Dimov <961014+dimodi@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:58:54 +0200 Subject: [PATCH 2/4] Add warning notes about EditContext and model instance --- _contentTemplates/common/form-validation.md | 6 +++++- components/form/formitems/template.md | 2 ++ components/form/validation.md | 4 +++- components/validation/overview.md | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/_contentTemplates/common/form-validation.md b/_contentTemplates/common/form-validation.md index 5367150957..8c59acacf4 100644 --- a/_contentTemplates/common/form-validation.md +++ b/_contentTemplates/common/form-validation.md @@ -1,7 +1,11 @@ #note-validation ->note The Telerik Blazor validation tools provide a way to display different types of validation messages. The main benefit is consistent styling with all other Telerik Blazor components. The validation tools do not expose API or settings for specific validation logic. You should configure the desired standard or custom validation separately, and then use our UI components to display messages to the user. +The Telerik Blazor validation tools provide a way to display different types of validation messages. The main benefit is consistent styling with all other Telerik Blazor components. The validation tools do not expose API or settings for specific validation logic. You should configure the desired standard or custom validation separately, and then use our UI components to display messages to the user. #end #note-telerik-role-in-validation > The Telerik components for Blazor do not perform the actual validation of the model. Validation is managed by the [`EditContext`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.forms.editcontext). The role of the Telerik components is to call `EditContext` methods, subscribe to `EditContext` events, retrieve validation messages, and display them. If a validation scenario does not work as expected, check the behavior in a standard Blazor `` to verify if the issue is related to the Telerik components. #end + +#note-editcontext-formitem-template +> When using the [Form `EditContext` parameter]({%slug form-overview%}#creating-blazor-form) together with [validation components]({%slug validation-tools-overview%}) or [Form item `