I used this link How can i add a field mobile number at the time of customer registration form in magento 2? to add mobile number field in the registration form which works fine. But I need to validate mobile number to be unique, min and max of 10 digits.

  • can you get the solution?. I also have the same problem. If you have the solution please post it.
    – Arul
    Commented Nov 8, 2019 at 16:56

1 Answer 1

data-validate="{maxlength:10, minlength:0}" 


data-validate="{rangelength:[0, 10]}" 

And for unique you must do it in your controller

  • Can you pls guide me
    – Ramesh KR
    Commented Nov 24, 2017 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.