product.utils.validate_attribute_value: refactor import code
product.utils.validate_attribute_value: refactor import code

Make it in a separate function for the next patch.

grengojbo/satchmo,grengojbo/satchmo