material-ui-phone-number icon indicating copy to clipboard operation
material-ui-phone-number copied to clipboard

How to set maxlength and minLength of characters

Open brianpooe opened this issue 5 years ago • 2 comments

Would be nice to get an error when certain characters are not met.

brianpooe avatar Jun 04 '19 16:06 brianpooe

@alexplumb +1 here, I tried to set the required prop, but when we use the dialcode in the input, it will always accept it because there is some data in the field.

Do you have a work around for that? As Brian point of it could be nice to example set a min length etc. :)

Thanks for looking into it!

Falkovic1993 avatar Aug 29 '19 07:08 Falkovic1993

you can add it like that: inputProps={{ minlength: 5, }}

vyacheslav-kara avatar Mar 23 '21 14:03 vyacheslav-kara