New Post: CustomizeValidator
No, sorry. CustomizeValidator is implemented as an ASP.NET MVC Model BInder, which is not something recognised by WebAPI.Jeremy
View ArticleNew Post: Fake it easy with Fluent Validation
I don't have experience with FakeItEasy, but have you tried explicitly specifying the other parameters of the Validate method?Personally I'd tend to avoid mocking validators - I find it simpler to just...
View ArticleNew Post: Fake it easy with Fluent Validation
Because of the optional parameters like ruleSet i am not able to mock the validator.The reason for mocking the validator is because it has some DB...
View ArticleNew Post: AppendArgument with PredicateValidator (Must)
Hi Guys,If you have a sample on how to use this new extension method please share it. Regards,Prasanna
View ArticleNew Post: Validation is not triggered when a property is compared with...
Hello Jeremy,this unit test should actually show an error but it does not.I guess the logic of my RuleFor is not correct.This is what I want to achieve:When IsFolder property is false (by default) and...
View ArticleNew Post: Localizing with external service
Hi Jeremy,I have the folowing validator, (the real validator in my project have 20 fields and property validation for each one): publicclass ContactValidator : AbstractValidator<Contact> {...
View ArticleNew Post: Validation is not triggered when a property is compared with...
HiThis rule will never trigger a validation error with your test. The rule states that the SelectedFolderTypeId property is valid when it is equal to 2 and IsFolder is false. In your test you specify a...
View ArticleNew Post: Localizing with external service
HiYou'll need to create a class that implements IStringSource so that the call to GetString invokes the IMessageProvider. You can then pass this to the ErrorMessageSoruce property of the rule....
View ArticleNew Post: Fake it easy with Fluent Validation
Personally I'd tend to mock out the db calls within the validator, rather than the validator itself. However if this is the route you want to use then you might want to put the validator behind a...
View ArticleNew Post: Validation is not triggered when a property is compared with...
Thanks that helped and maybe the root of all evil: [FluentValidation.Attributes.Validator(typeof(UnitViewModel))]:P that slipped in again...
View ArticleCommented Issue: RuleForEach - Feature Request [7118]
Add a "RuleForEach" method to AbstractValidator that allows validation to be defined for each item in a strongly typed collection but within the scope of the parent. This would be similar to defining...
View ArticleNew Post: MVC 4 Integration
Hello Jeremy,Does FluentValidation integrate with MVC 4 as well as it does for MVC 3? Thanks.
View ArticleNew Post: MVC 4 Integration
HiFluentValidation supports the same integration points for MVC4 as it did for MVC3. However, there is no support for WebAPI.Jeremy
View ArticleCommented Issue: RuleForEach - Feature Request [7118]
Add a "RuleForEach" method to AbstractValidator that allows validation to be defined for each item in a strongly typed collection but within the scope of the parent. This would be similar to defining...
View ArticleCommented Issue: RuleForEach - Feature Request [7118]
Add a "RuleForEach" method to AbstractValidator that allows validation to be defined for each item in a strongly typed collection but within the scope of the parent. This would be similar to defining...
View ArticleNew Post: Windows Store (Metro) Apps?
Hi,is there any plan to support Windows Store (Metro) Apps?
View ArticleNew Post: Windows Store (Metro) Apps?
Hi I'm not personally intending on adding support for metro, but I'll accept a patch if someone else wants to look at making the necessary changes.Jeremy
View ArticleCreated Issue: Activator.CreateInstance Problem [7119]
The following line of code when debugging finds the correct custom validator and steps into it's constructor and immediately throws a "Target of Invocation Exception". The inner exception states...
View ArticleNew Post: Pass lambda into rulefor
Hi GuysIm trying to build a lambda expression and pass this into rulefor. The code compiles, but when executing I get the follwing...
View ArticleEdited Issue: Activator.CreateInstance Problem [7119]
The following line of code when debugging finds the correct custom validator and steps into it's constructor and immediately throws a "Target of Invocation Exception". The inner exception states...
View Article