When I add this I get compiler messages, and I was unable to fix them by fiddling with the syntax or adding a private void IncludeNames(ValidationStrategy<object> options) { ... }. Adding them by code works. The message is about the FluentValidation.Internals namespace not existing.
GetFailuresFromLastValidation
To my shame, GetFailuresFromLastValidation() only seems to work when using ValidateAsync, not when using Validate. 2 tests are failing because of this, which is intended. The problem is, that only ValiadteAsync() adds the validation failures to the LastValidationResult property. Is it possible to add this with Validate or should we just add it as a caveat to the readme?
Please feel free to point out other issues I should test, or changes I should make!
Ok, this is what I have written so far. I have come across some issues, on which I need your feedback to.
Rule sets applied inconsistently
When validators contain rule sets, but these rule sets are not being included manually:
Validate
andValidateAsync
seem to ignore themIs this intended behavior?
Validation options
The syntax provided from the readme seems to be broken:
When I add this I get compiler messages, and I was unable to fix them by fiddling with the syntax or adding a
private void IncludeNames(ValidationStrategy<object> options) { ... }
. Adding them by code works. The message is about the FluentValidation.Internals namespace not existing.GetFailuresFromLastValidation
To my shame,
GetFailuresFromLastValidation()
only seems to work when usingValidateAsync
, not when usingValidate
. 2 tests are failing because of this, which is intended. The problem is, that only ValiadteAsync() adds the validation failures to theLastValidationResult
property. Is it possible to add this withValidate
or should we just add it as a caveat to the readme?Please feel free to point out other issues I should test, or changes I should make!