diff options
Diffstat (limited to 'src/DevHive.Web/Models/Identity/Validation')
3 files changed, 0 insertions, 64 deletions
diff --git a/src/DevHive.Web/Models/Identity/Validation/GoodPasswordModelValidation.cs b/src/DevHive.Web/Models/Identity/Validation/GoodPasswordModelValidation.cs deleted file mode 100644 index f920c35..0000000 --- a/src/DevHive.Web/Models/Identity/Validation/GoodPasswordModelValidation.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace DevHive.Web.Models.Identity.Validation -{ - public class GoodPassword : ValidationAttribute - { - public override bool IsValid(object value) - { - var stringValue = (string)value; - - for (int i = 0; i < stringValue.Length; i++) - { - if (Char.IsDigit(stringValue[i])) - { - base.ErrorMessage = "Password must be atleast 5 characters long!"; - return stringValue.Length >= 5; - } - } - base.ErrorMessage = "Password must contain atleast 1 digit!"; - return false; - } - } -} diff --git a/src/DevHive.Web/Models/Identity/Validation/OnlyAlphanumericsModelValidation.cs b/src/DevHive.Web/Models/Identity/Validation/OnlyAlphanumericsModelValidation.cs deleted file mode 100644 index 5c8c66c..0000000 --- a/src/DevHive.Web/Models/Identity/Validation/OnlyAlphanumericsModelValidation.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace DevHive.Web.Models.Identity.Validation -{ - public class OnlyAlphanumerics : ValidationAttribute - { - public override bool IsValid(object value) - { - var stringValue = (string)value; - - foreach (char ch in stringValue) - { - if (!Char.IsLetterOrDigit(ch)) - return false; - } - return true; - } - } -} diff --git a/src/DevHive.Web/Models/Identity/Validation/OnlyLettersModelValidation.cs b/src/DevHive.Web/Models/Identity/Validation/OnlyLettersModelValidation.cs deleted file mode 100644 index 29a995a..0000000 --- a/src/DevHive.Web/Models/Identity/Validation/OnlyLettersModelValidation.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace DevHive.Web.Models.Identity.Validation -{ - public class OnlyLetters : ValidationAttribute - { - public override bool IsValid(object value) - { - var stringValue = (string)value; - - foreach (char ch in stringValue) - { - if (!Char.IsLetter(ch)) - return false; - } - return true; - } - } -} |
