Author: hfnukal
Date: 2011-09-02 04:15:22 -0400 (Fri, 02 Sep 2011)
New Revision: 7289
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
Log:
JBEPP-985 DateTimeValidator has superflous code that breaks localized date timestamps
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2011-09-02
08:13:40 UTC (rev 7288)
+++
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2011-09-02
08:15:22 UTC (rev 7289)
@@ -45,9 +45,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)
@@ -79,10 +76,6 @@
{
throw new MessageException(new
ApplicationMessage("DateTimeValidator.msg.Invalid-input", args,
ApplicationMessage.WARNING));
}
- if (s.matches(DATETIME_REGEX) && isValidDateTime(s))
- return;
-
- throw new MessageException(new
ApplicationMessage("DateTimeValidator.msg.Invalid-input", args,
ApplicationMessage.WARNING));
}
private boolean isValidDateTime(String dateTime)
Show replies by date