Skip to content

Commit

Permalink
elaborate on poll option errors (#2030)
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterjun3 authored Nov 6, 2024
1 parent 4416778 commit 6993db5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TASVideos/Pages/Forum/Topics/AddEditPoll.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public async Task<IActionResult> OnPost()

if (!Poll.OptionsAreValid)
{
ModelState.AddModelError($"{nameof(Poll)}.{nameof(Poll.PollOptions)}", "Invalid poll options");
ModelState.AddModelError($"{nameof(Poll)}.{nameof(Poll.PollOptions)}", "Enter at least 2 options. Each option must be a string with a maximum length of 250.");
return Page();
}

Expand Down
2 changes: 1 addition & 1 deletion TASVideos/Pages/Forum/Topics/Create.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public async Task<IActionResult> OnPost()

if (!Poll.OptionsAreValid)
{
ModelState.AddModelError($"{nameof(Poll.PollOptions)}", "Invalid poll options");
ModelState.AddModelError($"{nameof(Poll.PollOptions)}", "Enter at least 2 options. Each option must be a string with a maximum length of 250.");
return Page();
}
}
Expand Down

0 comments on commit 6993db5

Please sign in to comment.