Author: tkobayas(a)redhat.com
Date: 2011-09-01 10:23:07 -0400 (Thu, 01 Sep 2011)
New Revision: 7276
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
Log:
GTNPORTAL-1502 DateTimeValidator validates incorrect with particular languages
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2011-09-01
14:03:40 UTC (rev 7275)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2011-09-01
14:23:07 UTC (rev 7276)
@@ -42,9 +42,6 @@
{
static private final String SPLIT_REGEX = "/|\\s+|:";
- static private final String DATETIME_REGEX =
-
"^(\\d{1,2}\\/\\d{1,2}\\/\\d{1,4})\\s*(\\s+\\d{1,2}:\\d{1,2}:\\d{1,2})?$";
-
public void validate(UIFormInput uiInput) throws Exception
{
if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() ==
0)
@@ -76,9 +73,5 @@
{
throw new MessageException(new
ApplicationMessage("DateTimeValidator.msg.Invalid-input", args,
ApplicationMessage.WARNING));
}
- if (s.matches(DATETIME_REGEX))
- return;
-
- throw new MessageException(new
ApplicationMessage("DateTimeValidator.msg.Invalid-input", args,
ApplicationMessage.WARNING));
}
}
Show replies by date