Jim Wise <[email protected]> writes:

>   object name extends MappedPoliteString(this, 128) {
>     override def defaultValue = ""
>
>     private def noSlashes(s: String) : List[FieldError] =
>       if (s.contains("/")) {
>       List(FieldError(this, Text("Category name \"" + s + "\" may not contain 
> \"/\"")))
>       } else {
>       Nil
>       }
>
>     override def validations = valMinLen(1, "Category name must not be 
> empty") _ ::
>       valUnique("Category name must be unique") _ ::
>       noSlashes _ ::
>       super.validations
>   }

Note that adding

         Log.error("noSlashes called")

to the validator function above results in no log message, which seems
to indicate that the validations are indeed never being run.

Is there anything I need to do at the level of the containing
LongKeyedMapper so that it's validate method calls the field's
validations?  Or does that happen automatically?

-- 
                                Jim Wise
                                [email protected]

Attachment: pgpq3JzDLuC22.pgp
Description: PGP signature

Reply via email to