Guest User

Untitled

a guest
Apr 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. trait MaxLenValidation {
  2. val maxLen:Int
  3. msg :String
  4. override def validations =
  5. valMaxLen( maxLen,msg )_ :: super.validations
  6. }
  7.  
  8. class Memo extends LongKeyedMapper[Message] with IdPK {
  9. def getSingleton = Message
  10.  
  11. object contents extends MappedString(this, 140)
  12. with MaxLenValidation{
  13. val maxLen = 140
  14. val msg:String = "Too Long!"
  15. }
  16. }
Add Comment
Please, Sign In to add comment