在下面的例子中。我在Name的远程验证中添加了外部类的附加字段Id。
public class Outerclass
{
public int Id {get;set;}
public InnerClass Inner {get;set;}
}
public class InnerClass
{
[Remote("IsNameAvail", "CMS", ErrorMessage = "Err", AdditionalFields = "Id")]
public string Name{get;set;}
}