concept validation context in category java

This is an excerpt from Manning's book Struts 2 in Action.
Now let’s assume that we have our validations defined in a single file for the SortAction named, appropriately, SortAction-validation.xml. This is what we did earlier in this chapter. This works great, but what happens if we decide that one of the sort entry points, or contexts, requires a different set of validations? Obviously, we need a finer granularity for our validation definitions. The notion of validation context solves this problem ASAP. If we need a different set of validations for each entry point method, we just replace the single SortAction-validation.xml with two new files, SortAction-BubbleSort-validation.xml and SortAction-HeapSort-validation.xml. Just to be clear, the naming convention is ActionClassName-aliasName-validation.xml. When one of the aliases from the preceding snippet is invoked, the validation framework automatically picks up the corresponding alias-named validation file. Note that if you still have a general SortAction-validation.xml defined, the validations defined in it will also be loaded. The aliased validations do not prevent the general ones from being used. This allows you to define common validations separate from the ones specific to the various contexts. Now, let’s look at another use case where validation context can be helpful.