| <?xml version="1.0" encoding="UTF-8"?> | 
| <ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata"> | 
|     <fullName>rentalNumChk</fullName> | 
|     <active>true</active> | 
|     <description>借出备品配套一览明细可借出数量不能超过备品配套明细设定的数量 | 
| IsBlank(Fixture_Set_Detail__c) 的话也不让改</description> | 
|     <errorConditionFormula>DataMigration_Flag__c == false | 
| && OR( | 
|     IsNew() | 
|   , ISCHANGED(Rental_Num__c) | 
| ) | 
| && OR( | 
|     Not(IsBlank(Fixture_Set_Detail__c)) && Rental_Num__c > Fixture_Set_Detail__r.Quantity__c | 
|   , IsBlank(Fixture_Set_Detail__c) && ISCHANGED(Rental_Num__c) | 
| )</errorConditionFormula> | 
|     <errorDisplayField>Rental_Num__c</errorDisplayField> | 
|     <errorMessage>借出备品配套一览明细可借出数量不能超过备品配套明细设定的数量</errorMessage> | 
| </ValidationRule> |