I'm hoping someone can help me. I want to write custom validation code on directly on the object rather than have to write separate methods for both the website UI and a web service which is using the same objects. Here is the code I have at present, which works but I don't think is the best solution, especially as it means having to use an object where I really just want to use standard string / int etc. I had thought that maybe I could use an attribute on the property of the object but as I can't set the value of the attribute that idea went out the window. Any help would be gratefully received.I'm hoping someone can help me. I want to write