Created Unassigned: .SetCollectionValidator in VS2008 [7163]
Hi, I'm trying to use fluent validation in VS2008.My problem is that, ServiceStack.FluentValidation.IRuleBuilderInitial() does not contain a definition for 'SetCollectionValidator'.The same code in...
View ArticleCommented Unassigned: .SetCollectionValidator in VS2008 [7163]
Hi, I'm trying to use fluent validation in VS2008.My problem is that, ServiceStack.FluentValidation.IRuleBuilderInitial() does not contain a definition for 'SetCollectionValidator'.The same code in...
View ArticleNew Post: Validate a Collection Object
Is it possible to validate an object that is a Collection? I've used it where a collection is a property in a class. I know I could enumerate through the collection and validate each object contained...
View ArticleNew Post: Validate a Collection Object
Not really...FluentValidation is designed to work by validating a single object (such as a view-model that represents a screen) from which all other objects hang off as properties. I'd suggest either...
View ArticleNew Post: Validate a Collection Object
What if it is a single object that inherits from Collection<>? Would it be possible to apply the contained object type validator to all of the objects? For example, what if I wanted to have an...
View ArticleNew Post: Anyway to get error message within a custom PropertyValidator
Hi, I'm currently trying to create a custom PropertyValidator which is working server side. Now I'm trying to implement IClientValidatable but need the error message. UPDATE: found out you can get it...
View ArticleNew Post: Anyway to get error message within a custom PropertyValidator
Hi Yes, this is the best way to do it. This is how the built-in rules get the error messages for use with clientside validators. The caveat is the messages cannot contain runtime placeholders.
View ArticleNew Post: Validate a Collection Object
So technically you could have a validator for OrderCollection that then uses RuleFor(x => x).SetValidator(), but I think this would mess up the automatic property name tracking (not sure - I haven't...
View ArticleNew Post: AutoFac IoC validators Issue
This worked for me; I know this is slightly off topic but could someone help me with this ? I have an abstract class which inherits from AbstractValidator thus : ``` public abstract class...
View ArticleNew Post: Best/Recommended way to include a ruleset as a subset of another...
Hi all, I am currently using Fluentvalidation to validate some ViewModels on our site. On an insert, certain properties are required, and on an update, those certain properties are still required, with...
View ArticleNew Post: Best/Recommended way to include a ruleset as a subset of another...
There's not really any way to do exactly what you're after....FluentValidation doesn't support rulesets as subsets of one another. The normal way to do this would just be to specify both for execution....
View ArticleNew Post: Best/Recommended way to include a ruleset as a subset of another...
Great on both counts. Thanks for the quick response!If you do implement it as a feature, maybe something in the rule set definition as `Includes(RulesetName)` would make sense. Then when generating the...
View ArticleNew Post: Want to pass parameters to a Validator yet be Efficient
Hi, new to Fluent here... What is the proper way to pass a parameter (of my choosing) to a validator, (called from an mvc controller action) and have the validation act on that parameter? This...
View ArticleNew Post: Want to pass parameters to a Validator yet be Efficient
Hi I think it depends on the scenario and what you're trying to achieve. If your validator needs to make use of some sort of service object to perform validation, then I would tend to inject this...
View ArticleNew Post: Can't seem to find the correct syntax for RuleSets in VB.NET
There is no overload when I want to use ruleSet once calling validator.Validate, how i can overcome this issue in VB.NET? This line is not building: validator.Validate(New Person(),...
View ArticleNew Post: Can't seem to find the correct syntax for RuleSets in VB.NET
This is an extension method. Ensure you've got the FluentValidation namespace imported.
View ArticleNew Post: Can't seem to find the correct syntax for RuleSets in VB.NET
Thank you, it worked.
View ArticleCommented Issue: Doesn't hook up to MVC ApiControllers [7116]
Hi, I'm trying to use fluent validation for my MVC 4 WebApi project.But it only seems to work on controllers that are inherited from the Controller type.When I use MyController : Controller -> works...
View ArticleNew Post: Checking for Immutable property changes
Hi Jeremy and all, I am stuck on a particular problem. I am using Fluent Validation to validate my entities before they hit the database and passing the ObjectStateEntry in to check the current state...
View ArticleNew Post: Checking for Immutable property changes
Hi The {PropertyName} placeholder is only for use within cuustom messages - you can't access this within a Must rule. You would need to write a custom property validator if you need access to the name...
View Article