aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/UserDetail.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-21 23:55:42 +0800
committer杨宇千 <crupest@outlook.com>2019-08-21 23:55:42 +0800
commite7714754d8f59bb8dc29aeb6340380e93310175b (patch)
tree7797613e18dd50665ac50881541f645413dbca97 /Timeline/Models/UserDetail.cs
parentdbc8d78dc0f21f423a0fe2db9dd782da43b5b468 (diff)
downloadtimeline-e7714754d8f59bb8dc29aeb6340380e93310175b.tar.gz
timeline-e7714754d8f59bb8dc29aeb6340380e93310175b.tar.bz2
timeline-e7714754d8f59bb8dc29aeb6340380e93310175b.zip
Add validators.
Diffstat (limited to 'Timeline/Models/UserDetail.cs')
-rw-r--r--Timeline/Models/UserDetail.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Timeline/Models/UserDetail.cs b/Timeline/Models/UserDetail.cs
index 91439c6a..4af88450 100644
--- a/Timeline/Models/UserDetail.cs
+++ b/Timeline/Models/UserDetail.cs
@@ -1,12 +1,19 @@
using Timeline.Entities;
+using Timeline.Models.Validation;
namespace Timeline.Models
{
public class UserDetail
{
+ [ValidateWith(typeof(UserDetailValidators.QQValidator))]
public string QQ { get; set; }
+
+ [ValidateWith(typeof(UserDetailValidators.EMailValidator))]
public string EMail { get; set; }
+
+ [ValidateWith(typeof(UserDetailValidators.PhoneNumberValidator))]
public string PhoneNumber { get; set; }
+
public string Description { get; set; }
private static string CoerceEmptyToNull(string value)