Changes in / [728eb31:80e2fe0]
- Location:
- src/FinkiChattery
- Files:
-
- 7 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/FinkiChattery/FinkiChattery.Commands/Questioning/QuestioningErrorCodes.cs
r728eb31 r80e2fe0 11 11 public const string AnswerAlreadyUpvoted = "AnswerAlreadyUpvoted"; 12 12 public const string AnswerAlreadyDownvoted = "AnswerAlreadyDownvoted"; 13 public const string StudentHasBadReputation = "StudentHasBadReputation"; 13 public const string StudentHasBadReputation = "StudentHasBadReputation"; 14 public const string AnswerTextLengthInvalid = "AnswerTextLengthInvalid"; 15 public const string QuestionNotFound = "QuestionNotFound"; 14 16 } 15 17 } -
src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/QuestioningFluentValidationRules.cs
r728eb31 r80e2fe0 16 16 } 17 17 18 public static IRuleBuilderOptions<T, string> AnswerTextValidate<T>(this IRuleBuilder<T, string> ruleBuilder) 19 { 20 return ruleBuilder.NotNull().WithMessage(QuestioningErrorCodes.CantBeNull).MaximumLength(4000).WithMessage(QuestioningErrorCodes.AnswerTextLengthInvalid); 21 } 22 18 23 public static IRuleBuilderOptions<T, IEnumerable<U>> ListNotNull<T, U>(this IRuleBuilder<T, IEnumerable<U>> ruleBuilder) 19 24 { -
src/FinkiChattery/FinkiChattery.Persistence/Models/Answer.cs
r728eb31 r80e2fe0 6 6 public class Answer : BaseEntity 7 7 { 8 public Answer() : base() 9 { 10 CreatedOn = DateTime.UtcNow; 11 VotesCount = 0; 12 CorrectAnswer = false; 13 } 14 8 15 public string Text { get; set; } 9 16
Note:
See TracChangeset
for help on using the changeset viewer.