예제 #1
0
 public IEnumerable<System.Web.Mvc.ModelClientValidationRule> GetClientValidationRules(System.Web.Mvc.ModelMetadata metadata, System.Web.Mvc.ControllerContext context)
 {
     return new[]{
         new System.Web.Mvc.ModelClientValidationStringLengthRule(FormatErrorMessage(metadata.GetDisplayName()), _minCharacters, int.MaxValue)
     };
 }
예제 #2
0
		/// <summary> Retrieve the a moniker's display name (i.e. it's unique string) </summary>
		protected string getMonikerString(System.Runtime.InteropServices.ComTypes.IMoniker moniker)
		{
			string s;
			moniker.GetDisplayName(null, null, out s);
			return (s);
		}
예제 #3
0
 public new IEnumerable<System.Web.Mvc.ModelClientValidationRule> GetClientValidationRules(System.Web.Mvc.ModelMetadata metadata, System.Web.Mvc.ControllerContext context)
 {
     yield return new ModelClientValidationRemoteRule(_conditionProperty, ValidateIfNot, FormatErrorMessage(metadata.GetDisplayName()), GetUrl(context), HttpMethod, FormatAdditionalFieldsForClientValidation(metadata.PropertyName));
 }