Using YaStringLength and YaRequired
This commit is contained in:
parent
7d9495e326
commit
9457ba71d1
62 changed files with 396 additions and 150 deletions
|
|
@ -7,6 +7,7 @@ namespace Yavsc.Models.Workflow
|
|||
using System;
|
||||
using Models.Relationship;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Attributes.Validation;
|
||||
using Yavsc.Workflow;
|
||||
|
||||
public class PerformerProfile : IPerformerProfile {
|
||||
|
|
@ -20,13 +21,13 @@ namespace Yavsc.Models.Workflow
|
|||
[Display(Name="Activity"), JsonIgnore]
|
||||
public virtual List<UserActivity> Activity { get; set; }
|
||||
|
||||
[Required,StringLength(14),Display(Name="SIREN"),
|
||||
[YaRequired,YaStringLength(14),Display(Name="SIREN"),
|
||||
RegularExpression(@"^[0-9]{9,14}$", ErrorMessage = "Only numbers are allowed here")]
|
||||
public string SIREN { get; set; }
|
||||
|
||||
public long OrganizationAddressId { get; set; }
|
||||
|
||||
[Required,Display(Name="Organization address"),ForeignKey("OrganizationAddressId")]
|
||||
[YaRequired,Display(Name="Organization address"),ForeignKey("OrganizationAddressId")]
|
||||
public virtual Location OrganizationAddress { get; set; }
|
||||
|
||||
[Display(Name="Accept notifications on client query")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue