Quantcast
Channel: Fluent Validation for .NET
Browsing all 1917 articles
Browse latest View live
↧

New Comment on "Localization"

Hi Jeremy. Is it possible to see default messages. I'd like to see them so I'd be able to translate them more easily.

View Article


Created Unassigned: The DisplayName couldnot be display for UI. [7196]

In my mvc5 web application, for localization service. I want to display the viewmodel property display name for different languages. In another issued, I found the way by override the default config in...

View Article


New Post: Is there a way to apply different rules based on specific property...

For instance, I've got a Type property in the object. When its value is 'A', i apply one set of rules. When it's 'B', use another different rules. How can I achieve this? There doesn't seem to be a way...

View Article

Reviewed: 5.2 (Sep 20, 2014)

Rated 5 Stars (out of 5) - Well though out and implemented solution. No MVC project should be without it.

View Article

New Comment on "mvc"

How do I configure Fluent Validation for Web API 2?

View Article


New Post: Portable library with .NET 4.5.2 + W 8.1 + WP 8.1

Hi I am not sure what is wrong. I tried the same with 4.5.1 + WP 8.1 + W8.1 and got same compilation errors. Make sure you choose all three platforms in PCL project properties. Thanks, Binoy

View Article

New Post: Portable library with .NET 4.5.2 + W 8.1 + WP 8.1

Yep, I have all 3 platforms selected and this all compiles fine without any problems. Perhaps you could send me a zip of your copy of the project? (email to jeremy@jeremyskinner.co.uk)

View Article

New Post: Access to rule Expression from ValidationFailure

Hi, thanks for a great framework! I'm trying to combine FV with an in-house WinForms framework which binds member Expressions to generic WinForms Controls (not columns in a table). The combination...

View Article


New Post: When Clause usage

Hey guys, on my input form I have an integer field that can be 0 or greater. Im doing something similar to an education system where this field would represent total credits needed. I then have a...

View Article


New Post: When Clause usage

Yes - there's a second overload of Must that accepts both the value and the object being validated. You can use this to get access to the ElectiveCredits property. See this section in the documentation.

View Article

New Post: Access to rule Expression from ValidationFailure

There isn't really a way to do this. The ValidationFailure objects are intentionally kept very simple so they can be easily serialized - I'm not keen on exposing additional parts of the rule from...

View Article

New Post: Is there a way to apply different rules based on specific property...

Yep, you can use the When method for this. See this page in the documentationWhen(x => x.Type == "A", () => { RuleFor.... }); When(x => x.Type == "B", () => { RuleFor.... });

View Article

New Comment on "mvc"

Please do not ask questions in the wiki comments - they are not monitored. If you have a question, please use the discussion page.

View Article


New Post: Access to rule Expression from ValidationFailure

Thanks, Jeremy! A good tip - I'll do something along those lines.

View Article

New Post: Is there a way to apply different rules based on specific property...

Works like a charm. Thanks a lot!

View Article


New Post: When Clause usage

Thank you Jeremy. That worked great!

View Article

New Post: Testing validators

Current ValidationTestExtensions enable us to test if some property has or has no errors. I think it might be worthwhile add new extension to be able to test which rule was triggered. Eg. I have two...

View Article


New Post: Testing validators

Thanks for the suggestion. Personally, I'm not keen on this approach so I don't have any plans on implementing it - this is really testing the internal implementation of the validator which I'd tend to...

View Article

New Post: Testing validators

I think I see what you mean. Yes - I can extend my tests to better cover the business rules and force me to write the correct implementation of validators. Thanks! Goran

View Article

New Post: How to create validator for type?

Hello, Is it possible to create a validator to test a type. For example: RuleFor(x => x.Value).OfType<Int32>().WithMessage("The name is required") Thank You, Miguel

View Article
Browsing all 1917 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>