<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>SixDigitContractIDOrBlank</fullName>
    <active>true</active>
    <errorConditionFormula>AND(
    NOT($Permission.AP_Bypass_VRs),
	OR(
		ISPICKVAL(Company__c, &quot;AWAL - 2820 US9820&quot;),
		RecordType.DeveloperName = &apos;AWALUK4914&apos;,
		RecordType.DeveloperName = &apos;AWALUK4916&apos;
	),
    NOT(ISBLANK(ContractID__c)),
    NOT(REGEX(ContractID__c, &quot;^\\d{6}$&quot;))
)</errorConditionFormula>
    <errorDisplayField>ContractID__c</errorDisplayField>
    <errorMessage>Contract ID must be a 6-digit number if provided. Please enter a number with exactly 6 digits or leave the field blank.</errorMessage>
</ValidationRule>
