10

Working through upgrading from grails 2.2.5 to 3.1 and we have an interesting error. How do we resolve this?

class grails.validation.Validateable is not an annotation in @grails.validation.Validateable
 @ line 17, column 1.
   @Validateable
   ^
Jay Prall
  • 5,295
  • 5
  • 49
  • 79

1 Answers1

21

The answer is that in Grails 2.x the 'Validateable' was applied using an annotation

@Validateable
class ApiCatalogCommand {}

In grails 3.x, it is now an interface:

class ApiCatalogCommand implements Validateable {}
Jay Prall
  • 5,295
  • 5
  • 49
  • 79
  • 2
    Thanks for the answer. That's a pity though - seems like a step backwards. – jondow Jul 11 '17 at 11:03
  • @JoeyHolloway nope, you define constraints in `static constraints = { ... }` block of the class. Just like with the domain objects – chill appreciator Dec 24 '20 at 11:14
  • 1
    I know this is years later, so I'm unsure of what value it may be, but I wanted to clarify that Validateable is now a trait, not an interface. I only say that because traits are much different than interfaces. – Peter LaBanca Aug 27 '21 at 16:33