When setting an "address" component within a Webform to "unique", a user can still submit the form again with the same address.

Use Case: a user can submit the webform to redeem a prize. While we could limit by email, users could enter multiple emails and continue to redeem, whereas it is more unlikely that someone has multiple mailing addresses to enter and receive the prize in the mail.

To replicate: Install the Webform module. Create a webform. Add an address field as "required" and "unique". Fill out the form once with a specific address. Fill out the form again with the same address. A submission still goes through with no warning or error message, even though the addresses are the same.

CommentFileSizeAuthor
#2 3003923-2.patch1.03 KBjrockowitz

Comments

kferencz91 created an issue. See original summary.

jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

Right now, composite elements can't support unique validation and this would require a significant amount of reworking.

The attached patch disables this feature.

I apologize for the confusion.

  • jrockowitz committed 911d427 on 8.x-5.x
    Issue #3003923 by jrockowitz, kferencz91: Unique Address
    
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch. Please download the latest dev release to review.

kferencz91’s picture

Sorry for the delay. I can confirm this patch removes the "unique" options for composite elements such as "Address". A bummer this functionality isn't there, but understood about its complexity.

kferencz91’s picture

Status: Fixed » Closed (fixed)