I ran into issue validating dates in my application. There are approximately 40 models with maybe a few dozen date fields between them. I have custom validations assigned to many models via attributes, and they are working very well. However, I want to step it up, and add a custom validation to an entire data type system-wide. So that I can be sure that all existing dates and all date fields in any class which may be added in the future are restricted in the same way, and the restriction is centralized.
I looked into System.Web.MVC.ClientCadaTypeModelValidatorProvider here: https://github.com/aspnet/AspNetWebStack/blob/42991b3d2537b702736463f76a10a4fcf2ea44c9/src/System.Web.Mvc/ClientDataTypeModelValidatorProvider.cs in hopes that I might deduce how to extend it with custom validation logic, however, I'm not smart enough to figure it out on my own.
How can I possibly attach a custom validator not to a particular field via explicit attribute assignment, but to an entire data type indiscriminately?