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) }; }
/// <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); }
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)); }