cancel
Showing results for 
Search instead for 
Did you mean: 

Can we create validation constraints based on catalog or user?

former_member646143
Participant
0 Kudos
625

Is there a way to create User or catalog specific validation Constraint?

former_member646143
Participant

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can create validation groups (ConstraintGroup) with different constraints assigned to the groups. When the user logs in (AfterSessionUserChangeEvent) you can set the appropriate ConstraintGroup on the session

 de.hybris.platform.validation.services.ValidationService.setActiveConstraintGroups(Collection<ConstraintGroupModel>)