Skip to content

rife.render.Mask

Erik C. Thauvin edited this page Mar 28, 2023 · 2 revisions

Masks characters of a template value.

Usage

<!--v render:rife.render.Mask:valueId/-->
{{v render:rife.render.Mask:valueId/}}

Sample

Template

Credit Card Number: <!--v render:rife.render.Mask:sample/-->

Code

template.setAttribute("sample", "374380141731053");

Output

Credit Card Number: ***************

Properties

You can customize the formatting using the following properties:

<!--v render:rife.render.Mask:foo-->
mask=•
unmasked=4
fromStart=true
<!--/v-->

which from the sample above would output:

Credit Card Number: 3743•••••••••••