Esempio n. 1
0
        protected override void ValidateCore()
        {
            if (WorkTaskId.IsBlankIdentity())
            {
                AddError("", "Idenitity is invalid.");
            }

            if (AuthorId.IsBlankIdentity())
            {
                AddError("", "Idenitity is invalid.");
            }

            if (!TextValidator.ValidateThatContentIsBetweenSpecifiedLength(Content, 1))
            {
                AddError("", "Content of the comment is invalid.");
            }
        }
Esempio n. 2
0
 public static bool ValidateCommentContent(string content) =>
 TextValidator.ValidateThatContentIsBetweenSpecifiedLength(content, CommentContentMinLength);
Esempio n. 3
0
 public static bool ValidateName(string name) =>
 TextValidator.ValidateThatContentIsBetweenSpecifiedLength(name, NameMinLength, NameMaxLength);
Esempio n. 4
0
 public static bool ValidateDefinitionOfDoneCondition(string condition) =>
 TextValidator.ValidateThatContentIsBetweenSpecifiedLength(condition, DefinitionOfDoneItemMinLength, DefinitionOfDoneItemMaxLength);
Esempio n. 5
0
 public static bool ValidatePassword(string password) =>
 TextValidator.ValidateThatContentIsBetweenSpecifiedLength(password, PasswordMinLength);
Esempio n. 6
0
 public static bool ValidateEmail(string email) =>
 TextValidator.ValidateThatContentIsBetweenSpecifiedLength(email, EmailMinLength, EmailMaxLength);
Esempio n. 7
0
 public static bool ValidateDisplayName(string displayName) =>
 TextValidator.ValidateThatContentIsBetweenSpecifiedLength(displayName, DisplayNameMinLength, DisplayNameMaxLength);
Esempio n. 8
0
 public static bool ValidateLastName(string lastName) =>
 TextValidator.ValidateThatContentIsBetweenSpecifiedLength(lastName, LastNameMinLength, LastNameMaxLength);
Esempio n. 9
0
 public static bool ValidateFirstName(string firstName) =>
 TextValidator.ValidateThatContentIsBetweenSpecifiedLength(firstName, FirstNameMinLength, FirstNameMaxLength);