Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;

public class ExampleModel
public class Model
{
[Required]
[StringLength(10, ErrorMessage = "Name is too long.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample1> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<InputText @bind-Value="exampleModel.Name" />
<InputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

@code {
private ExampleModel exampleModel = new ExampleModel();
private Model model = new Model();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample7> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<CustomInputText @bind-Value="exampleModel.Name" />
<CustomInputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

<p>
CurrentValue: @exampleModel.Name
CurrentValue: @model.Name
</p>

@code {
private ExampleModel exampleModel = new ExampleModel();
private Model model = new Model();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;

public class ExampleModel
public class Model
{
[Required]
[StringLength(10, ErrorMessage = "Name is too long.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample1> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<InputText @bind-Value="exampleModel.Name" />
<InputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

@code {
private ExampleModel exampleModel = new ExampleModel();
private Model model = new Model();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample7> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<CustomInputText @bind-Value="exampleModel.Name" />
<CustomInputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

<p>
CurrentValue: @exampleModel.Name
CurrentValue: @model.Name
</p>

@code {
private ExampleModel exampleModel = new ExampleModel();
private Model model = new Model();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;

public class ExampleModel
public class Model
{
[Required]
[StringLength(10, ErrorMessage = "Name is too long.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample1> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<InputText @bind-Value="exampleModel.Name" />
<InputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

@code {
private ExampleModel exampleModel = new();
private Model model = new();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample7> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<CustomInputText @bind-Value="exampleModel.Name" />
<CustomInputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

<p>
CurrentValue: @exampleModel.Name
CurrentValue: @model.Name
</p>

@code {
private ExampleModel exampleModel = new();
private Model model = new();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<DataAnnotationsValidator />
<ValidationSummary />

<InputText @bind-Value="exampleModel.Name" />
<InputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

@code {
private ExampleModel exampleModel = new();
private Model model = new();
private EditContext editContext;

protected override void OnInitialized()
{
editContext = new(exampleModel);
editContext = new(model);
editContext.SetFieldCssClassProvider(new CustomFieldClassProvider());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;

public class ExampleModel
public class Model
{
[Required]
[StringLength(10, ErrorMessage = "Name is too long.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample1> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<InputText @bind-Value="exampleModel.Name" />
<InputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

@code {
private ExampleModel exampleModel = new();
private Model model = new();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample7> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<CustomInputText @bind-Value="exampleModel.Name" />
<CustomInputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

<p>
CurrentValue: @exampleModel.Name
CurrentValue: @model.Name
</p>

@code {
private ExampleModel exampleModel = new();
private Model model = new();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<DataAnnotationsValidator />
<ValidationSummary />

<InputText @bind-Value="exampleModel.Name" />
<InputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

@code {
private ExampleModel exampleModel = new();
private Model model = new();
private EditContext editContext;

protected override void OnInitialized()
{
editContext = new(exampleModel);
editContext = new(model);
editContext.SetFieldCssClassProvider(new CustomFieldClassProvider());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;

public class ExampleModel
public class Model
{
[Required]
[StringLength(10, ErrorMessage = "Name is too long.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample1> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<InputText @bind-Value="exampleModel.Name" />
<InputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

@code {
private ExampleModel exampleModel = new();
private Model model = new();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample7> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<CustomInputText @bind-Value="exampleModel.Name" />
<CustomInputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

<p>
CurrentValue: @exampleModel.Name
CurrentValue: @model.Name
</p>

@code {
private ExampleModel exampleModel = new();
private Model model = new();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<DataAnnotationsValidator />
<ValidationSummary />

<InputText @bind-Value="exampleModel.Name" />
<InputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

@code {
private ExampleModel exampleModel = new();
private Model model = new();
private EditContext? editContext;

protected override void OnInitialized()
{
editContext = new(exampleModel);
editContext = new(model);
editContext.SetFieldCssClassProvider(new CustomFieldClassProvider());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;

public class ExampleModel
public class Model
{
[Required]
[StringLength(10, ErrorMessage = "Name is too long.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample1> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<InputText @bind-Value="exampleModel.Name" />
<InputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

@code {
private ExampleModel exampleModel = new();
private Model model = new();

private void HandleValidSubmit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
@using Microsoft.Extensions.Logging
@inject ILogger<FormExample7> Logger

<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />

<CustomInputText @bind-Value="exampleModel.Name" />
<CustomInputText @bind-Value="model.Name" />

<button type="submit">Submit</button>
</EditForm>

<p>
CurrentValue: @exampleModel.Name
CurrentValue: @model.Name
</p>

@code {
private ExampleModel exampleModel = new();
private Model model = new();

private void HandleValidSubmit()
{
Expand Down
Loading