Articles : Page 1 of 2
- Filter:
- MVC2
- validation
-
FluentValidation v3: ASP.NET MVC validation interceptors
Apr 1128This is part 3 in a series about new features in FluentValidation v3. Part 1 – RuleSets Part 2 – CustomizeValidatorAttribute Part 3 – ASP.NET MVC Validation interceptors Since ASP.NET MVC 2 was released last year, FluentValidation has had the ability to plug into the MVC validation pipeline using a custom ModelValidatorProvider. However, one of [...]...
-
Globalizing ASP.NET MVC Client Validation
May 1010One of my favorite features of ASP.NET MVC 2 is the support for client validation. I’ve covered a bit about validation in the following two posts: ASP.NET MVC 2 Custom Validation covers writing a custom client validator. Localizing ASP.NET MVC Validation covers localizing error messages. However, one topic I haven’t covered is how validation works with globalization. A common example of this is when validating a number, the client validation should understand that users in the US enter...
-
Globalizing ASP.NET MVC Client Validation
May 1010One of my favorite features of ASP.NET MVC 2 is the support for client validation. I’ve covered a bit about validation in the following two posts: ASP.NET MVC 2 Custom Validation covers writing a custom client validator. Localizing ASP.NET MVC Validation covers localizing error messages. However, one topic I haven’t covered is how validation works with globalization. A common example of this is when validating a number, the client validation should understand that users in the US enter...
-
FluentValidation 1.2 RC available
Mar 1014The Release Candidate for FluentValidation 1.2 is now available. This build contains minor bug fixes from 1.2 beta 3, the AssemblyScanner class that I mentioned in this post and compatibility with ASP.NET MVC 2 RTM. If there are no serious bugs found with this build in the next couple of weeks then I will declare it as [...]...
-
Extreme ASP.NET: Model Validation & Metadata in ASP.NET MVC 2
Feb 1024Scott Allen shows how to improve your user input validation with new features coming out in ASP.NET MVC 2 that easily allow validation on both the client and server. Scott Allen MSDN Magazine March 2010...
-
Partial Validation in ASP.NET MVC 2
Feb 1019It’s tiny tip time… Since all the fuss about [Required] validators in ASP.NET MVC 2, the validation behaviour was changed in Release Candidate 2. Previously, the framework only validated fields that were actually posted in the form, whereas now it validates all the fields on any model object that the model binder gives you. Most people [...]...
-
FluentValidation C4mvc Video
Feb 1013The video of my FluentValidation presentation for c4mvc is now available. In the video I cover some of the basics of using FluentValidation including: How to create a validator class Using templated error messages Writing custom validation rules Unit testing validators After this, I demonstrate how you can use FluentValidation with ASP.NET MVC2 to perform automatic validation when using Model Binding, [...]...
-
ASP.NET MVC 2 Optional URL Parameters
Feb 1012If you have a model object with a property named Id, you may have run into an issue where your model state is invalid when binding to that model even though you don’t have an “Id” field in your form. The following scenario should clear up what I mean. Suppose you have the following simple model with two properties. public class Product { public int Id { get; set; } public string Name { get; set; } } And you are creating a view to create a new Product. In such a view, you obviously don’...
-
ASP.NET MVC Complex Object ModelMetaData Issue
Feb 1008One of the exciting feature of ASP.NET MVC is(?) auto generating the view of the model with DisplayForModel/EditorForModel statement, it gives a nice extension point for the application developers to customize the view. But in the latest release (MVC2 RC2), it looks like the feature is no longer available. No, those methods are still available, but they are not working the same way as they were doing in the earlier versions. In rc2, if your model has any complex object, it will not render it ....
-
FluentValidation 1.2 Beta 2 and MVC2 RC2
Feb 1006FluentValidation 1.2 beta 2 is now available to download. This release focuses mainly on integration with ASP.NET MVC 2. Since my post on Limitations of MVC2s ModelValidatorProviders ASP.NET MVC2 RC2 has been released which addresses some of the issues that I raised in the post. Firstly, validation in MVC2 RC2 now performs model-validation rather than input validation. [...]...
- 1
- 2

