url mask placeholder option
How do I change the placeholder for the url mask?
I'm using Next.js 14 with along 'react-hook-form'
The following does not seem to work:
{...registerWithMask('website', 'url', { 'placeholder': 'https://' })}
I want to change the placeholder for the url mask placeholder from http:// to https...
I've gave the code a look here, and it seems to be set to https by default, but my placeholder is http as also the input masked value: http://mywebsite.com
hey @monecchi how u doing?
well, the url alias treat http and https so you cant set an placehold who trait the mask contract.
in this case its better use an custom mask.
i belive the follow mask will work:
"https:/\/(a|9|.|/|?|=){1,}"
@eduardoborges Thanks! I'll give it a try!
Hey @monecchi, results? haha
@eduardoborges Thanks for following up. It worked somehow… Although the regex did the trick, the masked result is only readable (visible) after submitting the form, it has a sort of “glitch” and it does not allow typing the (.) dot also. I’ll keep an eye on that in order to see if I’m applying it the right way.