Monday 17 September 2007 8:25:06 am
I think it's not possible to do it only with a new class. For me, the simpliest way is to create a class with the 2 attributes, with a custom edit template that allow to input only one of them (javascript validation prior to post, by example). More sophisticated, you can deleguate creation of these objects to a custom module, calling for a custom template. Another solution could be the custom datatype which will reject validation if link and file are submited, but it's maybe a kind of overkill.
|