Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
When field validation module validate Hierarchical Select field data.
The data already be converted to key value.
For example, you have a field "field_zone", it is a term reference field.
In Hierarchical Select field, you select:
"China" >> "Beijing" >> "Haidianqu",
You want to validate the length of "Haidianqu", But in field validation, the value have been converted to a term id such as "1234".
My issue is not only with the length, my issue is that is there any validator in field validation that can check if any term was selected or not? Please help
Comments
Comment #1
qasimzee commentedhttp://drupal.org/project/hierarchical_select
Comment #2
g089h515r806 commentedWhen field validation module validate Hierarchical Select field data.
The data already be converted to key value.
For example, you have a field "field_zone", it is a term reference field.
In Hierarchical Select field, you select:
"China" >> "Beijing" >> "Haidianqu",
You want to validate the length of "Haidianqu", But in field validation, the value have been converted to a term id such as "1234".
I am not sure if this is your use case.
Comment #3
qasimzee commentedMy issue is not only with the length, my issue is that is there any validator in field validation that can check if any term was selected or not? Please help
Thanks
Comment #4
g089h515r806 commentedAlready support validate against term name. I think this has been fixed.