def valid_fileproto(uri):
    try:
        return bool(re.match('^(?:salt|https?|ftp)://', uri))
    except Exception:
        return False
Get a form Field for a database Field that has declared choices.
dataset/ETHPy150Open saltstack/salt/salt/client/ssh/wrapper/config.py/valid_fileproto--crossover with--dataset/ETHPy150Open jschrewe/django-mongoadmin/mongoadmin/options.py/MongoFormFieldMixin.formfield_for_choice_field