• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GSP validations without domain classes

 
Amit Sharma
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have some textfields like email, name, mobile etc on a gsp page. I just want to validate them before saving in database, without using javascript at gsp page .
Is there any mechanism to do this in controller or somewhere else. And i am populating a bean by those parameters.
 
Xymor RM
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this?

http://www.grails.org/Command+objects+and+Form+Validation

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always just call domainInstance.validate().
 
Amit Sharma
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Xymor Actually i was looking for something like this only
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic