File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Groovy and the fly likes Custom Validators Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Custom Validators" Watch "Custom Validators" New topic

Custom Validators

Oscar Hansen

Joined: Jul 09, 2008
Posts: 10
I am trying to create a custom validator for variable 'amount' in my domain class, such that the new value should be greater than previous by 0.50.

For example, lets say the previous value was 1.0, next time the value should be atleast: [previous value + 0.50] or more.

Thanks in advance for the help
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

What have you gotten so far? Show us where you're stuck and we'll help you the rest of the way.

GenRocket - Experts at Building Test Data
Oscar Hansen

Joined: Jul 09, 2008
Posts: 10

We can do something like that or use creteria to get the max from the table. I got the problem resolved.
I agree. Here's the link:
subject: Custom Validators
It's not a secret anymore!