Hello, my name is Bill.

This commit is contained in:
MarcEricMartel
2022-12-12 12:28:21 -08:00
parent 23284fc514
commit 7a89d78e4a
7 changed files with 139 additions and 62 deletions

View File

@@ -36,4 +36,20 @@ namespace GrossesMitainesAPI.Models;
public string Email { get; set; }
public string Phone { get; set; }
public string LastFourDigits { get; set; }
[Required, Range(1, int.MaxValue)]
public int BillCivicNumber { get; set; }
public string? BillAppartment { get; set; }
[Required, MinLength(3), MaxLength(50)]
public string BillStreet { get; set; }
[Required, MinLength(4), MaxLength(50)]
public string BillCity { get; set; }
[Required, MaxLength(3)]
public string BillProvince { get; set; }
[Required, MinLength(4), MaxLength(30)]
public string BillCountry { get; set; }
// Source pour regex: https://stackoverflow.com/questions/15774555/efficient-regex-for-canadian-postal-code-function
//[Required, RegularExpression(@"/^[ABCEGHJ-NPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][ -]?\d[ABCEGHJ-NPRSTV-Z]\d$/i")]
public string BillPostalCode { get; set; }
}