diff options
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/xforms/binding.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 57d3727c6b97..b9f111a7e49e 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -207,7 +207,14 @@ bool Binding::isValid() const { // TODO: determine whether node is suitable, not just whether it exists return maBindingExpression.getNode().is() && - isValid_DataType() && + ( + // tdf#155121, validity rules should be apply when field is required or + // when the field is not required but not empty + // so if the field is not required and empty, do not check validity + (! maMIP.isRequired() && maBindingExpression.hasValue() + && maBindingExpression.getString().isEmpty() ) || + isValid_DataType() + ) && maMIP.isConstraint() && ( ! maMIP.isRequired() || ( maBindingExpression.hasValue() && |