diff --git a/OD.WebApplication/Models/HomeViewModel.cs b/OD.WebApplication/Models/HomeViewModel.cs index 7bf6143..d0a6ec5 100644 --- a/OD.WebApplication/Models/HomeViewModel.cs +++ b/OD.WebApplication/Models/HomeViewModel.cs @@ -1,3 +1,4 @@ +using System.ComponentModel.DataAnnotations; using System.IO; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.FileProviders; @@ -6,6 +7,7 @@ namespace OD.WebApplication.Models { public class HomeViewModel { + [Required] public IFormFile FileAttach { get; set; } } } \ No newline at end of file diff --git a/OD.WebApplication/Views/Home/Index.cshtml b/OD.WebApplication/Views/Home/Index.cshtml index 08b6ffb..67dd18c 100644 --- a/OD.WebApplication/Views/Home/Index.cshtml +++ b/OD.WebApplication/Views/Home/Index.cshtml @@ -5,16 +5,12 @@ }