def property_clean(prop, value):
 if (value is not None):
  try:
   prop.validate(prop.make_value_from_form(value))
  except (db.BadValueError, ValueError) as e:
   raise forms.ValidationError(unicode(e))

def property_clean ( prop , value ) : if ( value is not None ) : try : prop . validate ( prop . make_value_from_form ( value ) ) except ( db . BadValueError , ValueError ) as e : raise forms . ValidationError ( unicode ( e ) )
apply property level validation to value .