Skip to content

Commit 234d060

Browse files
authored
docs(form): Enhance information about EditContext creation
1 parent 15d3185 commit 234d060

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/form/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ The <a href = "https://demos.telerik.com/blazor-ui/form/overview" target="_blank
1616
## Creating Blazor Form
1717

1818
1. Add the `TelerikForm` tag to a razor file.
19-
1. Set the Form `Model` parameter to an object, or alternatively, set the `EditContext` parameter to an [`EditContext` instance](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.forms.editcontext).
19+
1. Bind the Form to data by using only one of the following two options:
20+
* Set the Form `Model` parameter to an object.
21+
* Set the `EditContext` parameter to an [`EditContext` instance](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.forms.editcontext). The object instance from which the `EditContext` is created is important, especially when using [FormItem templates]({%slug form-formitems-template%}) and [validation messages]({%slug form-validation%}).
2022
1. (optional) To enable [form validation]({%slug form-validation%}), add the `<FormValidation>` tag. Define a validator component inside, for example the [`DataAnnotationsValidator`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.forms.dataannotationsvalidator) that is part of .NET Core.
2123

2224
<div class="skip-repl"></div>

0 commit comments

Comments
 (0)