cancel
Showing results for 
Search instead for 
Did you mean: 

Validate two custom product attributes simultaneously

Validate two custom product attributes simultaneously

I'm new to Magento and I'm creating a module that adds two attributes to products via a Setup/InstallData class and using EavSetupFactory.  This is working fine and I've got a class passed via the 'backend' key in the array passed to addAttribute() to handle validation.  That's also working OK, I can check the submitted value of the attribute and throw an exception if it fails validation.  The problem is I can't see how I can compare it to the other custom attribute, I can only write code that validates one attribute at a time.  I've looked at attribute sets and groups but they don't seem to be the right thing.  Can anyone point me in the right direction?