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

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

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

Loading…
Cancel
Save