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

@ -6,6 +6,7 @@ using Yavsc.Models.Market;
namespace Yavsc.Models.Workflow
{
using Models.Relationship;
using Yavsc.Attributes.Validation;
/// <summary>
/// A date, between two persons
@ -17,21 +18,21 @@ namespace Yavsc.Models.Workflow
/// Event date
/// </summary>
/// <returns></returns>
[Required(),Display(Name="EventDate")]
[YaRequired(),Display(Name="EventDate")]
public DateTime EventDate { get; set; }
/// <summary>
/// Location identifier
/// </summary>
/// <returns></returns>
[Required]
[YaRequired]
public long LocationId { get; set; }
/// <summary>
/// A Location for this event
/// </summary>
/// <returns></returns>
[Required(ErrorMessage="SpecifyPlace"),Display(Name="Location"),ForeignKey("LocationId")]
[YaRequired(ErrorMessage="SpecifyPlace"),Display(Name="Location"),ForeignKey("LocationId")]
public Location Location { get; set; }
}