validation

Treatment of spaces-only input in ASP.NET MVC

I guess every framework has some kind of bizarre "default" behavior which can cause problems and will require thorough research and experimenting to understand what's going on. For ASP.NET MVC, one of the most stunning examples is its treatment of space symbols in input. It's a real pity that to understand how to deal with this (quite common) problem properly, one needs to do a lot of experimenting and gathering bits and pieces of information from different sources. This article is an attempt to collect this information and express it in more or less coherent way.

.NET RIA Services: intermediate model validation.

I'm not the first person firmly believing that validation should be mostly entity-based, not UI control-based. It's the object who must tell the system what kind of values should its field accept, user interface should only display this info. Microsoft Enterprise Library Validation Block was a serious step in the right direction, but uniform handling of data-based validation exceptions in user interface required quite a bit of custom coding there - just to make your UI know that the data was invalid.

Now, with validation attributes in System.ComponentModel.DataAnnotations namespace uniformly supported both in Silverlight (through .NET RIA Services) and in ASP.NET Dynamic Data, Microsoft makes even more serious step in supporting entity-based validation.

Syndicate content