Unable to import environment getting error message:
Error: (64:100): cvc-complex-type.2.4.b: The content of element 'ValidationRuleSet' is not complete. One of '{ValidationRule}' is expected.
Failed to import
Release : 14.4
The error points to the problem, there is a ValidationRuleSet that is missing a ValidationRule.
When we examined the directory.xml and compared it against an out-of-the-box Attribute Validation definition (included below for reference) we found that in this specific instance, the ValidationRuleSet name="International phone format" was missing a ValidationRule and a closing tag:
The out of the box Validation Rule for International phone format should be set to <ValidationRule name="Set International"/> and needs a closing tag </ValidationRuleSet>
Following is the default out of the box Attribute Validation definition for reference purposes: <ImsManagedObjectAttrValidation> <ValidationRule name="Valid User" description="Validates user unique name" messageid="4002"> <Java class="com.netegrity.ims.rule.ValidUser"/> </ValidationRule> <ValidationRule name="Valid Organization" description="Validates organization unique name" messageid="4002"> <Java class="com.netegrity.ims.rule.ValidOrg"/> </ValidationRule> <ValidationRule name="Valid Group" description="Validates group unique name" messageid="4002"> <Java class="com.netegrity.ims.rule.ValidGroup"/> </ValidationRule> <ValidationRule name="Set International" description="Add +1 to the number" messageid="4002"> <JavaScriptFile file="phone.js"/> </ValidationRule> <ValidationRule name="Phone pattern" description="+nn nnn-nnn-nnnn" messageid="4001"> <RegularExpression><![CDATA[((\+|\d)*+(\s*|\x2D))?\d\d\d-\d\d\d-\d\d\d\d]]></RegularExpression> </ValidationRule> <ValidationRuleSet name="International phone format" description="Set phone to +1 nnn-nnn-nnnn"/> <ValidationRule name="Set International"/> </ValidationRuleSet> <ValidationRuleSet name="Phone format" description="Verify format +nn nnn-nnn-nnnn"> <ValidationRule name="Phone pattern"/> </ValidationRuleSet> <ValidationRuleSet name="Organization Validation"> <ValidationRule name="Valid Organization"/> </ValidationRuleSet> <ValidationRuleSet name="Group Validation"> <ValidationRule name="Valid Group"/> </ValidationRuleSet> <ValidationRuleSet name="User Validation"> <ValidationRule name="Valid User"/> </ValidationRuleSet> </ImsManagedObjectAttrValidation>