diff --git a/docs/EditorControls/Button.md b/docs/EditorControls/Button.md index 9fa39b22c..fdc9c473a 100644 --- a/docs/EditorControls/Button.md +++ b/docs/EditorControls/Button.md @@ -13,6 +13,7 @@ Original Microsoft documentation: https://docs.microsoft.com/en-us/dotnet/api/sy - `CommandName` - the command name passed to `OnCommand` event - `CommandArgument` - the command argument passed to `OnCommand` event - `CausesValidation` - controls whether form validation is triggered on click (default: `true`) +- `ValidationGroup` - specifies the validation group for which the button triggers validation - `Enabled` - enables or disables the button - `Visible` - controls button visibility - `ToolTip` - tooltip text displayed on hover @@ -28,7 +29,6 @@ Original Microsoft documentation: https://docs.microsoft.com/en-us/dotnet/api/sy - **PostBackUrl** - Not supported; Blazor uses component events instead of postbacks to different pages - **UseSubmitBehavior** - Not supported; Blazor buttons trigger click events and you can inspect the form regardless -- **ValidationGroup** - Not yet implemented; use EditForm validation instead - **AccessKey** - Use HTML `accesskey` attribute directly if needed ## Web Forms Declarative Syntax @@ -153,6 +153,61 @@ Original Microsoft documentation: https://docs.microsoft.com/en-us/dotnet/api/sy ``` +### ValidationGroup - Selective Validation + +The `ValidationGroup` property allows you to create multiple validation groups on a single form. When a button with a `ValidationGroup` is clicked, only validators with the matching `ValidationGroup` will be triggered. + +**Important:** To use `ValidationGroup`, you must wrap your form in a `ValidationGroupProvider` component. + +```razor +@using BlazorWebFormsComponents.Validations + + + + @* Personal Information Group *@ + + + + + + +