# Notice that the name of the image field has to be repeated in each constraint # and the query object has to be passed in to access the "upload" routine, although # this is potentially already accessible through D::FV. constraints => { image_name => [ { constraint => 'file_format', params => [\'image_name',$q], }, { constraint => 'file_max_bytes', params => [\'image_name',$q,\100], }, { constraint => 'image_max_dimensions', params => [\'image_name',$q,\200,\200], }, ], } # A possible solution: Something that looks like "param" # but has access to the field name and the D::Fv object. constraints => { image_name => [ { constraint => 'file_format', oo_params => [], }, { constraint => 'file_max_bytes', oo_params => [\100], }, { constraint => 'image_max_dimensions', oo_params => [\200,\200], }, ], }