def validate_country_code(country_code): if country_code.strip() == "": return if lookup_country_code(country_code) is None: raise ValidationError("Invalid Country")
def validate_country_code(country_code): if lookup_country_code(country_code) is None: raise ValidationError('Invalid Country')