cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

difference between validateinterceptor and prepareinterceptor

Former Member
0 Likes
1,543

Hi experts, May I know the purpose and differences between ValidateInterceptor, PrepareInterceptor in backoffice customization..

View Entire Topic
Former Member
0 Likes

The Prepare Interceptor is called before a model is saved to the database before it is validated by Validate interceptors. This is used to add values to the model or modify existing ones before they are saved. An exception raised during execution prevents the model from being saved.

The Validate Interceptor is called before a model is saved to the database after is been prepared by the Prepare interceptors, above. You can use Validate Interceptors to validate values of the model and raise an InterceptorException if any values are not valid.

Also refer https://help.hybris.com/6.6.0/hcd/8bfbf43e8669101480d0f060d79b1baa.html for more detailed explanation.

Former Member
0 Likes

Thanks for your response...Sorry for late reply.. :)