From c5467d6b1c877dc68ab656bd16cb3922e67148f2 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 2 Oct 2018 19:17:55 -0500 Subject: [PATCH] use regex to validate phone numbers instead of [Phone] --- api/QCVOC.Api/Veterans/Data/DTO/VeteranEnrollRequest.cs | 2 +- api/QCVOC.Api/Veterans/Data/DTO/VeteranUpdateRequest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/QCVOC.Api/Veterans/Data/DTO/VeteranEnrollRequest.cs b/api/QCVOC.Api/Veterans/Data/DTO/VeteranEnrollRequest.cs index 02073ab7..153357e4 100644 --- a/api/QCVOC.Api/Veterans/Data/DTO/VeteranEnrollRequest.cs +++ b/api/QCVOC.Api/Veterans/Data/DTO/VeteranEnrollRequest.cs @@ -49,7 +49,7 @@ public class VeteranEnrollRequest /// Gets or sets the primary phone number of the Veteran. /// [Required] - [Phone] + [RegularExpression(@"^[1-9][0-9]{9}$")] public string PrimaryPhone { get; set; } /// diff --git a/api/QCVOC.Api/Veterans/Data/DTO/VeteranUpdateRequest.cs b/api/QCVOC.Api/Veterans/Data/DTO/VeteranUpdateRequest.cs index 78b4ecc5..6d8254a4 100644 --- a/api/QCVOC.Api/Veterans/Data/DTO/VeteranUpdateRequest.cs +++ b/api/QCVOC.Api/Veterans/Data/DTO/VeteranUpdateRequest.cs @@ -49,7 +49,7 @@ public class VeteranUpdateRequest /// Gets or sets the primary phone number of the Veteran. /// [Required] - [Phone] + [RegularExpression(@"^[1-9][0-9]{9}$")] public string PrimaryPhone { get; set; } ///