Scala validations