MiniValidation
MiniValidation copied to clipboard
Make polymorphism support an option
Supporting polymorphism requires the entire object graph of the object being validated be walked every time as any member of a type maybe a descendent type at runtime for that instance (modulo sealed types). This is obviously expensive so consider adding an option to make polymorphism an option (static property or new options object passed in to TryValidate). When disabled only the declared type of members would be considered when determining if a member has anything warranting validation (which is cached).