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.
David Lambauer
1,0722 gold badges9 silver badges25 bronze badges
-
can you get the solution?. I also have the same problem. If you have the solution please post it.Arul– Arul2019年11月08日 16:56:01 +00:00Commented Nov 8, 2019 at 16:56
1 Answer 1
data-validate="{maxlength:10, minlength:0}"
OR
data-validate="{rangelength:[0, 10]}"
And for unique you must do it in your controller
answered Nov 23, 2017 at 15:16
Mohamed El Mrabet
1,56214 silver badges24 bronze badges
-
Can you pls guide meRamesh KR– Ramesh KR2017年11月24日 05:57:38 +00:00Commented Nov 24, 2017 at 5:57
Explore related questions
See similar questions with these tags.
default