I want to validate specific method only in action class. Action method is this.
public String add() throws Exception {
To exclude some methods from validation you can override parameters of the validation interceptor. For example in interceptor stack you can write
input,back,cancel,browse,yourmethod
in the action configuration you can use above code and
input,back,cancel,browse,yourmethod
Note yourmethod is a method name.
You can specify a validation.xml for only one action by a postfix of action name in this file. For example AcrionClass-add-validation.xml will work only for the action name add in the action config. Note here add is an action name, not a method name.
Often, the name attribute matches the method name, but they may also differ.