Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Closes #1057. valMaxLen accepts null entries

  • Loading branch information...
commit 7cc7134c37a599dd7f80a646eb0ce49d1d318862 1 parent c973f08
@dpp dpp authored
View
2  core/util/src/main/scala/net/liftweb/util/BaseField.scala
@@ -189,7 +189,7 @@ trait StringValidators {
*/
def valMaxLen(len: Int, msg: => String)(value: ValueType): List[FieldError] =
valueTypeToBoxString(value) match {
- case Full(str) if (null ne str) && str.length <= len => Nil
+ case Full(str) if (null eq str) || str.length <= len => Nil
case _ => List(FieldError(this, Text(msg)))
}
View
2  web/webkit/src/main/scala/net/liftweb/http/LiftScreen.scala
@@ -564,7 +564,7 @@ trait AbstractScreen extends Factory {
*/
protected def valMaxLen(len: => Int, msg: => String): String => List[FieldError] =
s => s match {
- case str if (null ne str) && str.length <= len => Nil
+ case str if (null eq str) || str.length <= len => Nil
case _ => List(FieldError(currentField.box openOr new FieldIdentifier {}, Text(msg)))
}
Please sign in to comment.
Something went wrong with that request. Please try again.