-
Notifications
You must be signed in to change notification settings - Fork 0
rife.render.FormatCreditCard
Erik C. Thauvin edited this page Mar 18, 2023
·
1 revision
Formats a template credit card number value to the last 4 digits.
The number must satisfy the Luhn algorithm. Non-digits are stripped from the number.
<!--v render:rife.render.FormatCreditCard:valueId/-->
{{v render:rife.render.FormatCreditCard:valueId/}}
Template
Credit card ending in <!--v render:rife.render.FormatCreditCard:ccnumber/-->
Code
template.setAttribute("ccnumber","5130-3899-9169-8324");
Output
Credit card ending in 8324