Match another field(or entity property)
Last updated on
21 August 2023
This is a powerful validator that could be used on many case. it support multiple arguments for "another field":
include: entity_type, field_name, bundle, column, is_property. Here is some example when you config the validation rule:
for example,
1, make sure the value entered is a valid username,
entity_type=user&column=name&is_property=TRUE
2,validate against Article's title:
entity_type=node&bundle=article&column=title&is_property=TRUE
3,validate against User's realname field:
entity_type=user&field_name=field_realname&column=value
This validator leverages the EntityFieldQuery, some entity does not support bundle in entityCondition, you should make it correctly by yourself.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion
Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.