Validate customer document?

New Member
1 0 0



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">{{ '' | t }}</label>
<input type="text" id="AddressCompanyNew" name="address[company]" value="{{ }}">


I need to put a mathematical formula in this code.