Author: chris.laprun(a)jboss.com
Date: 2012-01-31 10:40:53 -0500 (Tue, 31 Jan 2012)
New Revision: 8329
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java
Log:
- ExpressionValidator needs to provide a format string to error message.
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java 2012-01-31
12:35:53 UTC (rev 8328)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java 2012-01-31
15:40:53 UTC (rev 8329)
@@ -69,4 +69,10 @@
matcher.reset(value);
return matcher.matches();
}
+
+ @Override
+ protected Object[] getMessageArgs(String value, UIFormInput uiInput) throws Exception
+ {
+ return new Object[]{getLabelFor(uiInput), matcher.pattern().toString()};
+ }
}