Validate customer document?

Highlighted
New Member
1 0 0

Hi,

 

Is there anyway of validating the costumer document during checkout?

In Brazil we need to put the "CPF" (kind of 11 numbers that identify each person) in orders. I changed a field in Checkout (replaces the field from Company to CPF in the translation of the theme) where I can get this information. But some customers put it wrong.

 

On "customers/adresses.liquid" i found the field do edit. But...

 

To validate this number a mathematical calculation is made. I would like to include this mathematical calculation in the theme code to be able to validate. Its possible?

 

Current code theme:

<div class="grid">
<div class="grid__item">
<label for="AddressCompanyNew">{{ 'customer.addresses.company' | t }}</label>
<input type="text" id="AddressCompanyNew" name="address[company]" value="{{ form.company }}">

 

I need to put a mathematical formula in this code. 

Thanks

0 Likes