Multi validation

how would you validate one of two fields

users can upload an image from either the file system or from a url

in the model how do you validate that at least only one is being used

i.e

validates_presence_of :img_path or validates_presence_of :img_url

cheers

dion

www.blogsaic.com
search, post, blog

could I do somethink like this

validates _presence_of :img_path if => {:img_url.nil?}

the syntax of this is not quite right but

On 9/9/06, Dion H. [email protected] wrote:

cheers

dion

www.blogsaic.com
search, post, blog

www.blogsaic.com
search, post, blog