Created Unassigned: [Validator(typeof(MyModelValidator))] [7139]
Get error on [Validator(typeof(NewMessageValidator))], it says that it isn't a valid attribute.Got the latest version on nuget (3.4.6.0), added FluentValidation, FluentValidation.MVC4. And because it...
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: Can FluentValidation use the DisplayFormat attribute to format...
I'd like to use an attribute to set the formatting for a property: [DisplayName("Amount")] [DisplayFormat(DataFormatString = "{0:C0}", ApplyFormatInEditMode = true)] public long ExpenseAmount { get;...
View ArticleNew Post: validate value type short
every time the User type words instead of numbers the following message appears:"The field XXX must be a number." how do I change the FluentValidation to this message?
View ArticleNew Post: Help with customizing extensions for .WithMessage()
I'm working on something where I have multiple levels of items, and I'd like to display the current item's parent's information in the error message without having to add tons of parameters to...
View ArticleNew Post: Validate 2 of 5 text boxes are not null
You probably already have a solution for this. If not, something like this should work:[Validator(typeof (InvoicePrintValidator))] public class InvoicePrintViewModel { [DisplayName("Account Number")]...
View ArticleNew Post: validate value type short
Not exactly sure if this is what you're looking for, but hopefully it will help:public class MyClass { public string NumberInput { get; set; } } public class MyClassValidator :...
View ArticleNew Post: Validate 2 of 5 text boxes are not null
I already have a solution but it is no where as nice asd this one!!!! I am going to test it out! Thanks you so much
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: Can FluentValidation use the DisplayFormat attribute to format...
Hi No, I'm afraid FluentValidation doesn't use attributes for customising error messages - you'll need to use the WithMessage method. There is an overload available that allows custom formatting to be...
View ArticleNew Post: Setting child collection properties validation result based on parent
Thanks for your reply Jeremy. I was attempting to use Custom for this very thing but I couldn't quite get a working solution at th e time. Thinking about it now, I presume I would have to write many...
View ArticleNew Post: Help with customizing extensions for .WithMessage()
Hi I'm afraid this isn't possible with the current release, but having greater control of how messages are built is a really good idea. I've just committed a change that should allow you to do this -...
View ArticleSource code checked in, #4a3fea6e861e3c34816df48364254d7c57f218c6
Allow custom error message builder
View ArticleNew Post: Setting child collection properties validation result based on parent
Yes, you would have to write a separate custom call. Although this means you wouldn't get as much use from the FluentValidation validators, you need to evaluate where FluentValidation is actually...
View ArticleNew Post: validate value type short
thanks for listening already tried this command line but my variable is not of type string, it is of type shortpublic class MyClass { public short NumberInput { get; set; } } public class...
View ArticleNew Post: validate value type short
This isn't actually anything to do with FluentValidation, but rather with MVC. If you are trying to map a text box to a numeric property, but the value you enter is not numeric then MVC will generate...
View ArticleNew Post: Help with customizing extensions for .WithMessage()
Thanks for the blazing fast response! This is exactly what I was looking for, and it's working perfectly.
View ArticleNew Post: validate value type short
thanks, before loading the plugin "jquery.validate.unobtrusive" I added this command line$(document).removeData("validator"); $("input[data-val-number]").each(function (index, el) { var re = new...
View ArticleNew Post: validate value type short
I'm afraid not, sorry. FluentValidation is solely designed for validation, and is agnostic of UI - it has no knowledge of html attributes or tags. Jeremy
View ArticleCommented Issue: LengthValidator validates null inputs [7133]
Most validators should not validate null input, because that condition is validated with NotNull. LengthValidator assumes a length of 0 for null, breaking the convention.I think LengthValidator should...
View Article