Hi, I followed Custom Validation documentation steps adding my own message in OnXXXCreated method:
partial void OnGrtCreated(Grt item)
{
if (item.registrado > DateTime.Now)
{
throw new Exception("La fecha de registro no puede estar en el futuro");
}
if (item.registrado < DateTime.Now.AddDays(-90))
{
throw new Exception("La fecha de registro es demasiado antigua");
}
if (item.comprometido < DateTime.Now)
{
throw new Exception("La fecha de registro no puede estar en el pasado");
}
}
Validation fired, but custom message doesn't show:
{"error":{"code":"","message":"The input was not valid.","details":[{"code":"","message":"The input was not valid."}]}}
Some missing?
Thanks!
P.D. .net core app 3.1 with Angular frontend