on ‎2021 Feb 02 2:38 PM
Hi experts
i need to create some constraints and check product description based some product attribute (in product cockpit).
For example: if product catalog is X and category Y check if description in EN is not null.
i've created a new custom constraint, but i'm not able to get the product model to read the product attributes. To Create the custom contraint i've followed this link.
Any help?any suggestion?
Thanks Marco
Request clarification before answering.
The first thing that comes to mind is that this example uses an AttributeConstraint but you seem to need a TypeConstraint if that wasn't clear.
If your ConstraintValidator uses the correct type parameters, then the "isValid" method should provide the productModel as an attribute. Could it be that you simply copied:
ConstraintValidator<NotLoremIpsum,String>Instead of using smth like the following?
ConstraintValidator<NotLoremIpsum,ProductModel>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
anyone can help me?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.