Unfortunately, Drupal does not support that.
The following states may be applied to an element:
- enabled
- disabled
- required
- optional
- visible
- invisible
- checked
- unchecked
- expanded
- collapsed
The following states may be used in remote conditions:
- empty
- filled
- checked
- unchecked
- expanded
- collapsed
- value
The following states exist for both elements and remote conditions, but are not fully implemented and may not change anything on the element:
- relevant
- irrelevant
- valid
- invalid
- touched
- untouched
- readwrite
- readonly
When referencing select lists and radio buttons in remote conditions, a 'value' condition must be used:
@code
'#states' => array(
// Show the settings if 'bar' has been selected for 'foo'.
'visible' => array(
':input[name="foo"]' => array('value' => 'bar'),
),
),
@endcode
You can see state support value, but value is array, so can't use condition of value.
See the process states documentation page for more information