correction de la partie ajout

blazor
Patrick BRUGIERE 1 year ago
parent f3777f5144
commit b431fc0535

@ -8,12 +8,14 @@ namespace adminBlazor.Models
public int Id { get; set; }
[StringLength(50, ErrorMessage = "Name length can't be more than 50.")]
[DataType(DataType.Password)]
public string Password { get; set; }
[EmailAddress]
public string Email { get; set; }
[StringLength(50, ErrorMessage = "Name length can't be more than 50.")]
[Required]
public string Name { get; set; }
[StringLength(50, ErrorMessage = "Name length can't be more than 50.")]
@ -26,7 +28,9 @@ namespace adminBlazor.Models
public string Image { get; set; }
public bool ExtraTime { get; set; }
public int Group { get; set; }
public List<String> Roles { get; set; }
}

@ -47,6 +47,24 @@
<InputText @bind-Value="user.Surname" />
</label>
</p>
<p>
<label>
Image
<InputText @bind-Value="user.Image" />
</label>
</p>
<p>
<label>
ExtraTime
<InputCheckbox @bind-Value="user.ExtraTime" />
</label>
</p>
<p>
<label>
Group
<InputNumber @bind-Value="user.Group" />
</label>
</p>
<button type="submit">Submit</button>
</EditForm>

Loading…
Cancel
Save