| <?xml version="1.0" encoding="UTF-8"?> | 
| <ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata"> | 
|     <fullName>For_contract_loaner_only_active_contract</fullName> | 
|     <active>false</active> | 
|     <errorConditionFormula>RecordTypeId  <> "01210000000RHIn"  &&  | 
| ISBLANK(Old_Rental_Apply__c) && | 
| (AND(RA_Status__c <> '已出库', Text(Status__c) <> '删除',  Text(Status__c) <> '取消', | 
| ISPICKVAL(demo_purpose2__c, "保修合同用户维修代用"),  | 
| ISBLANK(Repair__r.Maintenance_Contract__r.Name)))</errorConditionFormula> | 
|     <errorMessage>只有维修合同内的修理,可以申请维修合同代用品</errorMessage> | 
| </ValidationRule> |