@page "/fetchdata"
@using Syncfusion.Blazor.Buttons

<EditForm Model="Annotate">
    <DataAnnotationsValidator></DataAnnotationsValidator>
    <div class="form-group">
        <SfCheckBox Label="Option 1" 
                TChecked="bool?"
                EnableTriState="true" 
                
                @bind-Checked="@Annotate.Check"></SfCheckBox>
        <ValidationMessage For="@(() => Annotate.Check)" />
    </div>
    <SfButton HtmlAttributes="@Submit" Content="Submit"></SfButton>
</EditForm>

@code {
    public Annotation Annotate = new Annotation();
    public class Annotation
    {
        [System.ComponentModel.DataAnnotations.Required(ErrorMessage = "Uhmmm! Not null, please.")]
        public bool? Check { get; set; } = null;
    }
    public Dictionary<string, object> Submit = new Dictionary<string, object>()
    {
        { "type", "submit"}
    };
}
