Skip to content

Commit

Permalink
Fixed edit employee not working due to non-existing password field va…
Browse files Browse the repository at this point in the history
…lidation
  • Loading branch information
fuj1n committed Jun 13, 2022
1 parent 8fe60fa commit e2dedad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
namespace ReservationSystem_Server.Areas.Admin.Models.Employee;
using System.ComponentModel.DataAnnotations;

public class EditViewModel : CreateViewModel
namespace ReservationSystem_Server.Areas.Admin.Models.Employee;

public class EditViewModel
{
public string Id { get; set; } = null!;
[EmailAddress]
public string Email { get; set; } = null!;
[Phone]
public string? PhoneNumber { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@
<button type="submit" class="btn btn-primary mt-2">Submit</button>

<input hidden asp-for="Id" />
<input hidden asp-for="Password" value="no-op" />
</form>

0 comments on commit e2dedad

Please sign in to comment.