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
commit1a998040268282086549e67ae81f8e059ee885a9 (patch)
tree7797613e18dd50665ac50881541f645413dbca97 /Timeline/Models/UserDetail.cs
parent431ba02aa831448ca2aa9e9a42aa3aaf1345edbe (diff)
downloadtimeline-1a998040268282086549e67ae81f8e059ee885a9.tar.gz
timeline-1a998040268282086549e67ae81f8e059ee885a9.tar.bz2
timeline-1a998040268282086549e67ae81f8e059ee885a9.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)