22 lines
706 B
C#
22 lines
706 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace PartyInvites.Models
|
|
{
|
|
public class GuestResponse
|
|
{
|
|
[Required(ErrorMessage = "Please enter your name")]
|
|
public string Name { get; set; }
|
|
|
|
[Required(ErrorMessage = "Please enter your email address")]
|
|
[RegularExpression(".+\\@.+\\..+",
|
|
ErrorMessage = "Please enter a valid email address")]
|
|
public string Email { get; set; }
|
|
|
|
[Required(ErrorMessage = "Please enter your name")]
|
|
public string Phone { get; set; }
|
|
|
|
[Required(ErrorMessage = "Please specify whether you'll attend")]
|
|
public bool? WillAttend { get; set; }
|
|
|
|
}
|
|
} |