forms: do not call validation function on empty values (#55014)
This commit is contained in:
parent
65d7693f3e
commit
7b25253cf9
|
@ -1271,7 +1271,7 @@ class WcsExtraStringWidget(StringWidget):
|
|||
self.field.validation
|
||||
)
|
||||
|
||||
if self.validation_function and not self.validation_function(self.value):
|
||||
if self.value and self.validation_function and not self.validation_function(self.value):
|
||||
self.error = self.validation_function_error_message or _('invalid value')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue