Mercurial > hg > markup
comparison markup/form.py @ 9:aa97fe7223c8
py3
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Tue, 03 Nov 2020 15:43:50 -0800 |
parents | ad2d8969ce25 |
children | 9abb7436bb10 |
comparison
equal
deleted
inserted
replaced
8:ad2d8969ce25 | 9:aa97fe7223c8 |
---|---|
100 try: | 100 try: |
101 validation = validator(*args) | 101 validation = validator(*args) |
102 except Exception as e: | 102 except Exception as e: |
103 error = str(e) | 103 error = str(e) |
104 else: | 104 else: |
105 if isinstance(validation, basestring): | 105 if isinstance(validation, string: |
106 error = validation # error string | 106 error = validation # error string |
107 elif validation == False: | 107 elif validation == False: |
108 error = "Illegal value for %s" % name | 108 error = "Illegal value for %s" % name |
109 if error: | 109 if error: |
110 for name in names: | 110 for name in names: |