fix maxlength test
gitea/wcs/pipeline/head There was a failure building this commit
Details
gitea/wcs/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
fca535f2c0
commit
8253d20176
|
@ -676,6 +676,10 @@ class TextWidget(QuixoteTextWidget):
|
|||
def _parse(self, request, use_validation_function=True):
|
||||
QuixoteTextWidget._parse(self, request)
|
||||
if self.value is not None:
|
||||
try:
|
||||
maxlength = int(self.attrs.get('maxlength', 0))
|
||||
except (TypeError, ValueError):
|
||||
maxlength = 0
|
||||
if maxlength:
|
||||
if len(self.value) > maxlength:
|
||||
self.set_error('too_long')
|
||||
|
|
Loading…
Reference in New Issue