Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Much like #2241699: Validator "unique value on multiple fields" pointing empty values as non unique which has been closed as fixed, the single value version of this rule does not work with empty values. Perhaps this is fixed for the multiple values option, but it still fails validation if you use the Unique Values option (not multiple) and considers the empty field not unique. There may be a way to do this with conditional validation or some setting on the rule, but I can't figure a way to make it work...creating new issue since I can't reopen the aforementioned ticket...
Comment | File | Size | Author |
---|---|---|---|
#4 | field_validate-ignore_empty_value_validation-2816007-4.patch | 1.18 KB | qichanghai |
#2 | field_validate-ignore_empty_value_validation-2816007-2.patch | 1.18 KB | qichanghai |
Comments
Comment #2
qichanghai CreditAttribution: qichanghai commentedI patched it by adding an option in the setting form which allow ignore empty value in validation. If it's checked, the empty value will not be checked against unique.
Comment #3
qichanghai CreditAttribution: qichanghai commentedComment #4
qichanghai CreditAttribution: qichanghai commentedSorry there is a typo in the previous patch. Please check this new patch.