Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait MaxLenValidation {
- val maxLen:Int
- msg :String
- override def validations =
- valMaxLen( maxLen,msg )_ :: super.validations
- }
- class Memo extends LongKeyedMapper[Message] with IdPK {
- def getSingleton = Message
- object contents extends MappedString(this, 140)
- with MaxLenValidation{
- val maxLen = 140
- val msg:String = "Too Long!"
- }
- }
Add Comment
Please, Sign In to add comment