A Blazor sample that demonstrates validating Rich Text Editor content using EditForm and data annotation attributes.
This sample shows how to integrate the Blazor Rich Text Editor with EditForm to validate user-entered content. The example uses data annotation attributes on the model so the editor content is validated like other form fields and validation messages are displayed.
- Uses
EditFormfor validation - Validates editor content with data annotation attributes
- .NET 8.0 SDK
- Visual Studio 2022+ or VS Code
- Syncfusion license (if required by NuGet packages)
Installation
git clone https://github.com/SyncfusionExamples/blazor-richtexteditor-editform-validation.git
cd blazor-richtexteditor-editform-validationRestore NuGet packages
dotnet restoreRun the application
dotnet runEdit content in the Rich Text Editor inside the EditForm, then submit. Validation attributes on the model control whether submission succeeds and display messages when invalid.
- Ensure NuGet packages are restored and the project builds.
- Confirm
EditFormand model bindings are set correctly if validation messages do not appear.