I am doing both client and server side validation and for one particular View I need to validate a field that isn't posted in the other views. How can I do this if I'm using the same model for both?
-
1Can you show some code for the model?Paul– Paul2011-05-08 05:32:03 +00:00Commented May 8, 2011 at 5:32
-
You can do specific client-side validation on the new view, but on the server side I think you're going to need a bit of view-specific code to perform the validation on the other field, if you're using the same ViewModel. I don't know of anything "out of the box" that fulfills the concept of "view-specific validation."Robert Harvey– Robert Harvey2011-05-08 17:03:11 +00:00Commented May 8, 2011 at 17:03
-
Thanks Robert. Would that view specific validation basically be implemented by directly generating an error message for the View versus use of validation methods?user743183– user7431832011-05-08 18:40:35 +00:00Commented May 8, 2011 at 18:40
Add a comment
|