Author: hlship
Date: Tue Jan 23 08:15:51 2007
New Revision: 499063
URL: http://svn.apache.org/viewvc?view=rev&rev=499063
Log:
Remove blank check from MinLength, as that is externalized now.
Modified:
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/validator/MinLength.java
Modified:
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/validator/MinLength.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/validator/MinLength.java?view=diff&rev=499063&r1=499062&r2=499063
==============================================================================
---
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/validator/MinLength.java
(original)
+++
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/validator/MinLength.java
Tue Jan 23 08:15:51 2007
@@ -19,6 +19,9 @@
import org.apache.tapestry.Validator;
import org.apache.tapestry.ioc.MessageFormatter;
+/**
+ * Validates that a string value has a minimum length.
+ */
public class MinLength implements Validator<Integer, String>
{
public String getMessageKey()
@@ -29,12 +32,6 @@
public void check(Field field, Integer constraintValue, MessageFormatter
formatter, String value)
throws ValidationException
{
- // Validators should ignore blank/null values.
- // TODO: Could this be externalized so that the Validator doesn't need
to check?
-
- if (value.equals(""))
- return;
-
if (value.length() < constraintValue)
throw new ValidationException(formatter.format(constraintValue,
field.getLabel()));
}