Does ASP.Net MVC 2 validation need some more thought in terms of patterns and use? -


Here is the look of the land like most people I have my domain object and I have my thoughts model. Like the idea of ​​using the model, because it allows specially designed models for visual references specifically without the need to change my business object.

I have a problem with defined type level validation. Obtaining those rules for my domain object and client In this case, I believe that using the data annotation to describe the management rules When I am moving the visual model from the domain object, the visual model does not know which interface it should execute. (Because verification is defined back on domain object.)

With MVC 2 you can get it for client / server side validation based on the validation rules of existing object. But because the verification rules are defined on the domain object and not the visual model, I have to mimic the verification rules on the viewing model to make it work.

How does the behavior of others deal with this type of behavior? My thinking is that in addition to mapping data to see data from Domus object, we also need to map the validation rules, but I have not really seen others about this issue ... Brad Wilson Only talk about this issue

Cheers Anthony

Div class = "Post-text" itemprop = "text">

Data connection attributes are valid about the input and end user The Uai feedback. It is in fact their sole purpose, I use different verification strategies for UI objects and business objects, so the DA legalization features end up on the model being shown to the user.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -