Browse Source

[Authentication] Add required attributes for login dbo

develop
Robin Thoni 9 years ago
parent
commit
1cc9e9a1d7
2 changed files with 8 additions and 1 deletions
  1. 1
    0
      Authentication/Authentication.csproj
  2. 7
    1
      Authentication/DBO/BasicUserLogin.cs

+ 1
- 0
Authentication/Authentication.csproj View File

@@ -55,6 +55,7 @@
55 55
       <HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
56 56
     </Reference>
57 57
     <Reference Include="System" />
58
+    <Reference Include="System.ComponentModel.DataAnnotations" />
58 59
     <Reference Include="System.Configuration" />
59 60
     <Reference Include="System.Core" />
60 61
     <Reference Include="System.IdentityModel" />

+ 7
- 1
Authentication/DBO/BasicUserLogin.cs View File

@@ -1,9 +1,15 @@
1
-namespace iiie.Authentication.DBO
1
+using System.ComponentModel.DataAnnotations;
2
+
3
+namespace iiie.Authentication.DBO
2 4
 {
3 5
     public class BasicUserLogin
4 6
     {
7
+        [Required]
8
+        [MinLength(1)]
5 9
         public string Username { get; set; }
6 10
 
11
+        [Required]
12
+        [MinLength(1)]
7 13
         public string Password { get; set; }
8 14
     }
9 15
 }

Loading…
Cancel
Save