aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Models/Identity/User/UpdateUserWebModel.cs
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-01-19 21:46:06 +0200
committertranstrike <transtrike@gmail.com>2021-01-19 21:46:06 +0200
commit8560caa13b7f7d0e80ee712c77efc59a80e8935c (patch)
tree02643afdd46122dfd904fbb8632117a5494081a8 /src/DevHive.Web/Models/Identity/User/UpdateUserWebModel.cs
parent661c3194b750e42146e9e28a33da08419b2b2cea (diff)
downloadDevHive-8560caa13b7f7d0e80ee712c77efc59a80e8935c.tar
DevHive-8560caa13b7f7d0e80ee712c77efc59a80e8935c.tar.gz
DevHive-8560caa13b7f7d0e80ee712c77efc59a80e8935c.zip
Added attributes to the Web models for validations
Diffstat (limited to 'src/DevHive.Web/Models/Identity/User/UpdateUserWebModel.cs')
-rw-r--r--src/DevHive.Web/Models/Identity/User/UpdateUserWebModel.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/DevHive.Web/Models/Identity/User/UpdateUserWebModel.cs b/src/DevHive.Web/Models/Identity/User/UpdateUserWebModel.cs
index 782c558..724930c 100644
--- a/src/DevHive.Web/Models/Identity/User/UpdateUserWebModel.cs
+++ b/src/DevHive.Web/Models/Identity/User/UpdateUserWebModel.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using DevHive.Web.Models.Identity.Validation;
+using System.Diagnostics.CodeAnalysis;
+using DevHive.Web.Attributes;
using DevHive.Web.Models.Language;
using DevHive.Web.Models.Technology;
@@ -8,14 +9,21 @@ namespace DevHive.Web.Models.Identity.User
{
public class UpdateUserWebModel : BaseUserWebModel
{
+ [NotNull]
[Required]
[GoodPassword]
public string Password { get; set; }
+ [NotNull]
+ [Required]
public IList<FriendWebModel> Friends { get; set; }
+ [NotNull]
+ [Required]
public IList<UpdateLanguageWebModel> Languages { get; set; }
+ [NotNull]
+ [Required]
public IList<UpdateTechnologyWebModel> Technologies { get; set; }
}
}