Skip to content

Instantly share code, notes, and snippets.

@komainu85
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save komainu85/7ec2eb61f680956dc7b9 to your computer and use it in GitHub Desktop.
Save komainu85/7ec2eb61f680956dc7b9 to your computer and use it in GitHub Desktop.
Entity Service Validation Model
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace MikeRobbins.EntityServiceDemo.Models
{
public class NewsArticle : Sitecore.Services.Core.Model.EntityIdentity
{
public string itemId { get; set; }
public string Title { get; set; }
public string Description { get; set; }
[NotPastDateAttribute(ErrorMessage ="Date must be in the future")]
public DateTime Date { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment