Skip to content

Commit c5467d6

Browse files
committed
use regex to validate phone numbers instead of [Phone]
1 parent 0f55eb0 commit c5467d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/QCVOC.Api/Veterans/Data/DTO/VeteranEnrollRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class VeteranEnrollRequest
4949
/// Gets or sets the primary phone number of the Veteran.
5050
/// </summary>
5151
[Required]
52-
[Phone]
52+
[RegularExpression(@"^[1-9][0-9]{9}$")]
5353
public string PrimaryPhone { get; set; }
5454

5555
/// <summary>

api/QCVOC.Api/Veterans/Data/DTO/VeteranUpdateRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class VeteranUpdateRequest
4949
/// Gets or sets the primary phone number of the Veteran.
5050
/// </summary>
5151
[Required]
52-
[Phone]
52+
[RegularExpression(@"^[1-9][0-9]{9}$")]
5353
public string PrimaryPhone { get; set; }
5454

5555
/// <summary>

0 commit comments

Comments
 (0)