forked from Sarah/Lieb-Website
added input validation for poll creation
This commit is contained in:
parent
2a69ccc1b6
commit
1f5a1f4fe2
3 changed files with 37 additions and 5 deletions
|
@ -1,8 +1,13 @@
|
|||
namespace Lieb.Models.Poll
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Lieb.Models.Poll
|
||||
{
|
||||
public class PollOption
|
||||
{
|
||||
public int PollOptionId { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "Option too long (100 character limit).")]
|
||||
public string Name { get; set;} = string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue