Skip to content

Instantly share code, notes, and snippets.

@wfaler
Created February 23, 2011 21:59
Show Gist options
  • Save wfaler/841279 to your computer and use it in GitHub Desktop.
Save wfaler/841279 to your computer and use it in GitHub Desktop.
CarValidatorBuilder.scala
class CarValidatorBuilder extends ModelValidatorBuilder[Car]{
def initialize(bean: Car): ModelValidator = {
val builder = new DefaultModelValidator(classOf[Car])
builder.add(MinLength("model", 3, {bean.model}))
return builder
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment