function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dhananjaya BulugahamulleDhananjaya Bulugahamulle 

How do you add a Validation rule for a pick list Value?

I have a two dependent pick list.

System Size - 50L S.U.B. - 100L S.U.B. - 250L S.U.B. - 500L S.U.B. - 1000L S.U.B. - 2000L S.U.B.

Cable Management Tree - Right Side - Left Side - No Cable Management Tree Needed

If I select 2000L SUB from System Size I want to hide ( or Deactivate) Right and Left Side values from Cable management pick list. I only want to select No Cable Management Tree Needed, when System size is 2000L SUB. Does anybody have any idea, how to put a Validation rule or something that work for my problem (Only show "No Cable Management Tree Needed" in Cable Management pick list when someone select "2000 L SUB" in System Size pick list). Thanks. 

Note - Dependent pick list ​does not work for this problem. Coz I already used for something else. 
<apex:page standardController="Product_Brief__c" extensions="test1">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockSection  collapsible="false" columns="2">
                <apex:inputField value="{!Product_Brief__c.System_Size_SUB_2013__c}" required="true"/>
                <apex:inputField value="{!Product_Brief__c.Cable_Management_Tree__c}"/>
            </apex:pageBlockSection>
         </apex:pageBlock >
     </apex:form >

 
Abhi_TripathiAbhi_Tripathi
There is two ways to make picklist dependent on the vf page

1. Make the picklist dependent to each other at field level then call them on vf page using inputField tag it will inherit the property of dependent picklist on vf page.
How to make dependent picklist please go to this link https://help.salesforce.com/HTViewHelpDoc?id=fields_defining_field_dependencies.htm

2. On vf page you can create picklist dependent using custom logic
Here is one example https://www.minddigital.com/how-to-create-dynamic-dependent-picklist-of-objects-within-salesforce/