using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace drinkMe.Client.Models
{
	public class CreditCardForm
	{
		[Required, Display(Name = "Credit card number"),
			MaxLength(16), MinLength(16)]
		public string Number { get; set; }
		[Required, Display(Name = "Expiration month"),
			Range(2, 2), RegularExpression(@"^((0[1-9])|(1[0-2]))$", ErrorMessage = "Invalid month")]
		public string ExpirationMonth { get; set; }
		[Required, Display(Name = "Expiration year"),
			Range(2, 2), RegularExpression(@"^(\d{2})$", ErrorMessage = "Invalid year")]
		public string ExpirationYear { get; set; }
		[Required, Display(Name = "CVV code"),
			Range(3, 3), RegularExpression(@"^(\d{3})$", ErrorMessage = "Invalid CVV code")]
		public string CVVCode { get; set; }
	}
}
