New Post: Client Validation - When Clause
Hi, Have you found a issue for this problem ? Thanks in advance, Jérôme
View ArticleNew Post: Adding some other rules
hi, Could you add 2 more rules please : - IsNull => validate that a field is null - IsEmpty (for Collection) => validate that an ICollection have 0 item. For the IsNull i did somethink...
View ArticleNew Post: Property Validation Message Starts Out Visible
First let me say that Fluent Validation is a terrific project and that all of my validation seems to be working fine except for this one issue. I'm using MVC3 and client side validation is enabled....
View ArticleNew Post: Two Validators for one Model
Hello Jeremy, I have this case when I need to validate a model with two validators: 1) a BaseValidator that has some common rules. 2) [Variable]CustomValidator which is determined based on one of the...
View ArticleNew Post: Property Validation Message Starts Out Visible
This doesn't really sound like a problem with FluentValidation...it seems more likely that there's something wrong with the javascript on the page that is causing MVC's errors to appear prematurely....
View ArticleNew Post: Two Validators for one Model
This isn't something that's really supported I'm afraid...the closest thing would be to embed a When clause inside the AnimalValidator that discriminates based on type: public class AnimalValidator :...
View ArticleNew Post: Ignoring initial values.
Hi All, I find myself in the situation of having a form that is displayed without any default values. The rules I have for the text fields are normal length constraints e.g. 0 < length <...
View ArticleNew Post: Two Validators for one Model
lol, I like the property example: SwallowsHairballs :) poor animals... Thanks for the reply. I think this could do. It would be nice to be able to put the rules for cats and dogs into separate files....
View ArticleNew Post: Two Validators for one Model
In order to achieve what I've described I have reworked my structure into following: [Validator(typeof(AnimalValidator))] public class AnimalModel { public string AnimalType { get; set; } public...
View ArticleNew Post: Two Validators for one Model
I haven't been able to reproduce this in my sample application...if you could put together a small sample project that reproduces the issue and email it to me (jeremy at jeremyskinner.co.uk) then I'll...
View ArticleNew Post: Ignoring initial values.
Are you using the MVC integration? If so, it sounds like something on the client is triggering the validation. Could you try reproducing the issue using DataAnnotations rather than FluentValidation to...
View ArticleNew Post: Ignoring initial values.
Hi Jeremy, Unfortunately we do not use MVC/ASP.Net rather we are building a WPF application. However, what you said about the validation being triggered by "something" opens up another avenue of...
View ArticleNew Post: Ignoring initial values.
Thanks for clarifying. I'm afraid that I have no experience with using FluentValidation with IDataErrorInfo, so I can't really comment on how this should work, but FluentValidation will only perform...
View ArticleNew Post: Two Validators for one Model
Sent you an email with sample app. Thanks for your help!
View ArticleNew Post: Two Validators for one Model
Thanks. I'm afraid I might not get time to look at this until the weekend, but will will let you know when I do. Jeremy
View ArticleNew Post: Two Validators for one Model
Thanks Jeremy, As I said before, any help is very appreciated. Thank You, Dmitry On Wed, Jul 25, 2012 at 12:57 AM, JeremyS <notifications@codeplex.com> wrote: From: JeremyS Thanks. I'm afraid I...
View ArticleNew Post: Validating Collection of Primitive Types
My object has a List<string> that I want to validate the format of using a regular expression. From reading the docs it sounds like I need to do a separate validator: class...
View ArticleNew Post: Specify a ruleset on a model instance?
I understand that I can specify a ruleset when model binding takes place eg. [HttpPost] public ActionResult Edit([CustomizeValidator(RuleSet = "Edit")]EmployeeCreateEditViewModel viewModel) {...}...
View ArticleNew Post: Validating Collection of Primitive Types
I think rhe reason you are getting error there is that domains.Any() does not have any lambda in it like this: domains.Any(x => x.whatever == "whatever") I am not sure where you were going with that...
View ArticleNew Post: Specify a ruleset on a model instance?
Hi You can use the RuleSetForClientSideMessagesAttribute to do this. Place it on your action method and it will ensure that only the specified ruleset is used:...
View Article