FluentValidation icon indicating copy to clipboard operation
FluentValidation copied to clipboard

Add ability to pass in an array of IValidator

Open ElliottBrand opened this issue 2 years ago • 1 comments

Added a parameter to pass in an array of IValidator, so validation can occur on all the provided validators.

ElliottBrand avatar Jan 23 '23 18:01 ElliottBrand

How do you handle this case: Validator is set with a validator of type IValidator<MyModel> and Validators is set with two validators for specific fields of MyModel ?

My guess is field/model validation in Validator branch will fail with Cannot validate instances of type 'MyFieldType'. This validator can only validate instances of type 'MyModel'..

Can you test this case ?

midoriiro avatar Apr 01 '23 12:04 midoriiro