DamianEdwards / MiniValidation

A minimalist validation library for .NET built atop the existing features in `System.ComponentModel.DataAnnotations` namespace
MIT License
338 stars 27 forks source link

Use Validator.TryValidateValue instead of Validator.TryValidateProperty #9

Closed DamianEdwards closed 3 years ago

DamianEdwards commented 3 years ago

https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.validator.tryvalidatevalue?view=net-5.0

This might be quicker as the validation attributes can be cached as part of the type scan so that the call simply needs to directly invoke the passed ValidationAttributes method using the passed value.