The MappedEmail class does not take kindly to blank submissions in it’s default form, however with a simple override you can retain all the goodness of the validations built into MappedEmail, while ignoring these requirements if there is no value submitted:

object emailAddress extends MappedEmail(this, 100) {
override def validate = if (this.is == "") Nil else super.validate
}

Comment now!
















Trackbacks