FoolproofValidationはWEBAPIでは機能しないようです。
// POST api/values
public void Post(MyModel model)
{
}
public class MyModel
{
public int Id { get; set; }
public bool Condition { get; set; }
[RequiredIfFalse("Condition")]
public string Title { get; set; }
}
フィドラー:
User-Agent: Fiddler
Content-Type: application/json; charset=utf-8
Host: localhost:3858
Content-Length: 24
{Id: 1, Condition: true}
応答:
{"Message":"An error has occurred.","ExceptionMessage":"The method or operation is not implemented.","ExceptionType"
同じコードが、従来のMVC4テマプレートでも正常に機能します。