Skip to content

SyncfusionExamples/blazor-richtexteditor-editform-validation

Repository files navigation

Blazor RichTextEditor EditForm Validation

A Blazor sample that demonstrates validating Rich Text Editor content using EditForm and data annotation attributes.

Project Overview

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.

Key Points

  • Uses EditForm for validation
  • Validates editor content with data annotation attributes

Prerequisites

  • .NET 8.0 SDK
  • Visual Studio 2022+ or VS Code
  • Syncfusion license (if required by NuGet packages)

Setup & Running Steps

Installation

git clone https://github.com/SyncfusionExamples/blazor-richtexteditor-editform-validation.git
cd blazor-richtexteditor-editform-validation

Restore NuGet packages

dotnet restore

Run the application

dotnet run

Usage

Edit 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.

Troubleshooting

  • Ensure NuGet packages are restored and the project builds.
  • Confirm EditForm and model bindings are set correctly if validation messages do not appear.

See also

About

The Rich Text Editor support validation using the EditForm. The user type text content inside the editor is validated with data annotations attributes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors