From 09ca986adbcb6b5707d9dac6778039990ae7cdf0 Mon Sep 17 00:00:00 2001 From: Matthai Kurian <matthai.kurian@frentix.com> Date: Mon, 30 Jul 2012 10:23:28 +0200 Subject: [PATCH] OO-318: corrected for case of non mandatory field with regexp --- .../propertyhandlers/Generic127CharTextPropertyHandler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/olat/user/propertyhandlers/Generic127CharTextPropertyHandler.java b/src/main/java/org/olat/user/propertyhandlers/Generic127CharTextPropertyHandler.java index ba03507bba1..cf187da4509 100644 --- a/src/main/java/org/olat/user/propertyhandlers/Generic127CharTextPropertyHandler.java +++ b/src/main/java/org/olat/user/propertyhandlers/Generic127CharTextPropertyHandler.java @@ -99,7 +99,11 @@ public class Generic127CharTextPropertyHandler extends AbstractUserPropertyHandl if (textElemItem.isEmpty("new.form.mandatory")) { return false; } - } + } else { + if (textElemItem.getValue().equals("")) { + return true; + } + } if (regExp != null) { return regExp.matcher(textElemItem.getValue()).matches(); -- GitLab