Prevent Credit Card Number Submissions

Created on 10 May 2015, over 9 years ago
Updated 2 September 2023, over 1 year ago

I had been hunting for a way to prevent users from entering credit card numbers in submissions, but couldn't find anything robust.

I wrote a custom validation using this great module (and included clientside validation support) that removes all non-numbers, and then Luhn checks every 15 and 16 digit sequence in a number, textfield, or textarea component and rejects any component containing a sequence that passes.

My code is here: https://www.drupal.org/sandbox/jannis/2486167 β†’

✨ Feature request
Status

Needs work

Version

1.0

Component

Validation rules

Created by

πŸ‡ΊπŸ‡ΈUnited States jannis

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024