From efb1b6a8134b627d981e91512fa6e3cdc6c655d4 Mon Sep 17 00:00:00 2001 From: Dimo Dimov <961014+dimodi@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:52:23 +0200 Subject: [PATCH] docs(form): Enhance information about EditContext creation (#2492) * docs(form): Enhance information about EditContext creation * Add warning notes about EditContext and model instance * Update _contentTemplates/common/form-validation.md Co-authored-by: Iva Stefanova Koevska-Atanasova * Update components/form/validation.md Co-authored-by: Iva Stefanova Koevska-Atanasova --------- Co-authored-by: Iva Stefanova Koevska-Atanasova --- _contentTemplates/common/form-validation.md | 6 +++++- components/form/formitems/template.md | 2 ++ components/form/overview.md | 4 +++- components/form/validation.md | 6 +++++- components/validation/overview.md | 2 ++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/_contentTemplates/common/form-validation.md b/_contentTemplates/common/form-validation.md index 5367150957..b9d6f8cf51 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 let you match the style of your validation messages to all other Telerik Blazor components in your app. The validation tools do not expose API or settings for specific validation logic. You need to handle the validation logic separately and then use the Telerik Blazor UI components to display messages to the end 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 `