Jump to content

How do I validate all customer records fields or create masks for all these fields?


franzneves

Recommended Posts

1) for example If you look your tpl you find some like these

 

<input class="is_required validate account_input form-control" type="password" data-validate="isPasswd" id="passwd" name="passwd" value="{if isset($smarty.post.passwd)}{$smarty.post.passwd|stripslashes}{/if}" />

 

look close

 

class="is_required validate account_input form-control"

data-validate="isPasswd"

 

 

go to prestashop/js/validate.js you look 

function validate_isPasswd(s)
{
return (s.length >= 5 && s.length < 255);
}

these check for example lenght you can change the values or add your own functions 

 

 

2 ) You can use html to fix the lenght for example for the phone not more to 10 put inside the input maxlength="9"

 

 

you can do another things but depen on what do you want to do  

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...