Using YaStringLength and YaRequired

This commit is contained in:
Paul Schneider 2019-09-04 01:25:36 +01:00
commit 9457ba71d1
62 changed files with 396 additions and 150 deletions

View file

@ -2,6 +2,7 @@ using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Abstract.Streaming;
using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Streaming
{
@ -18,29 +19,29 @@ namespace Yavsc.Models.Streaming
/// a title for this flow
/// </summary>
/// <value></value>
[StringLength(255)]
[YaStringLength(255)]
[Display(Name="TitleLabel", ResourceType=typeof(LiveFlow))]
public string Title { get; set; }
// a little description
[StringLength(1023)]
[YaStringLength(1023)]
[Display(Name="PitchLabel", ResourceType=typeof(LiveFlow))]
public string Pitch { get; set; }
// The stream type
[StringLength(127)]
[YaStringLength(127)]
[Display(Name="MediaTypeLabel", ResourceType=typeof(LiveFlow))]
public string MediaType { get; set; }
// A name where to save this stream, relative to user's files root
[StringLength(255)]
[YaStringLength(255)]
[Display(Name="DifferedFileNameLabel", ResourceType=typeof(LiveFlow))]
public string DifferedFileName { get; set; }
[Display(Name="SequenceNumberLabel", ResourceType=typeof(LiveFlow))]
public int SequenceNumber { get; set; }
[Required]
[YaRequired]
[Display(Name="OwnerIdLabel", ResourceType=typeof(LiveFlow))]
public string OwnerId {get; set; }