Skip to content

Commit

Permalink
add server checks for string lengths on userfiles titles, the db alre…
Browse files Browse the repository at this point in the history
…ady had this constraint, this prevents 500 errors, I think this also resolves all of the viable concerns in #1770
  • Loading branch information
adelikat committed Feb 28, 2024
1 parent 077d86b commit 24e4662
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions TASVideos/Pages/UserFiles/Models/UserFileEditModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace TASVideos.Pages.UserFiles.Models;
public class UserFileEditModel
{
[Required]
[StringLength(255)]
public string Title { get; set; } = "";

[Required]
Expand Down
1 change: 1 addition & 0 deletions TASVideos/Pages/UserFiles/Models/UserFileUploadModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class UserFileUploadModel
public IFormFile? File { get; set; }

[Required]
[StringLength(255)]
public string Title { get; set; } = "";

[Required]
Expand Down

0 comments on commit 24e4662

Please sign in to comment.