ContactViewModel.cs 592 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace DutchTreat.ViewModels
  8. {
  9. public class ContactViewModel
  10. {
  11. [Required]
  12. [MinLength(5)]
  13. public string Name { get; set; }
  14. [Required]
  15. [EmailAddress]
  16. public string Email { get; set; }
  17. [Required]
  18. public string Subject { get; set; }
  19. [Required]
  20. [MaxLength(250, ErrorMessage = "Too Long")]
  21. public string Message { get; set; }
  22. }
  23. }