What is the best way to limit maximum area that can be clipped?

Discussion created by grahash on Jun 28, 2011
I've set up a modified version of the Clip and Ship example to clip layers from a web map.  So far, so good.  However, I'd like to limit the maximum area that can be clipped.  For example, if the area selected is over 2000 square miles I want to display a message indicating the user should select a smaller area to clip.

At this point I'm not sure what the best approach would be.  Would this be best accomplished with an IF-THEN-ELSE type of statement?  Or would a precondition be applicable in a scenario like this?
Is there another approach I should be looking at?