-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Validate value compared to current value
PostPosted: Tue Mar 25, 2014 12:03 pm 
Newbie

Joined: Tue Mar 25, 2014 11:55 am
Posts: 1
Hello,

I would like to use hibernate-validator for validation in my current project but am not sure how to implement the type of validation I would like to perform. Let me describe the validation and see if anyone knows how I might go about implementing this.

I have an object, For example: a computer.
The computer can be in one of a handful of states: off, booting, on.
The computer should not go from 'off' to 'on' immediately. It must go through the 'booting' state.

I would like to validate that when I am setting the state of the computer to 'on' that it is actually in the 'booting' state.

Is this possible with the hibernate-validator? I do not mind implementing a custom validator, I just do not see how it is possible to accomplish this with the framework.

Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.