Phone-input mask v3
Hay I just upgraded v3 yesterday.. I'm trying to format my phone mask which is '+1 (000) 000-0000' but unable to do so with given example in v3
14 Replies
->mask('+1 (999) 999-9999')
?it doesn't work because whenever I try put phone number in field it just shows the mask number not what I entered
@leandro_ferreira
Can you share an image?
Any console errors?
TextInput::make('phone') ->mask(RawJs::make(<<<'JS'
$input.startsWith('+1') || $input.startsWith('+1') ? '+1 999 999 9999' : '+1 999 999 9999'
JS))
now I'm using this is it right??
@leandro_ferreira
yep, It was supposed to work. What is the issue?
this one is working but when I was using only mask that was not working
any console errors? What is your browser?
what about this?
->extraAlpineAttributes(['x-mask' => '+1 999 999 9999'])
no there was no error before
this one worked thanks π
I don't know why
->mask
doesn't work π
.Yeah idk why and there was no error otherwise I would have sned u picture
it 's kind of strange now when I used->mask('+1 999 999 9999') its working and if I use ->mask('+1 (000) 000-0000') then its not working ... also its happening when I use it with ->extraAlpineAttributes π§ @leandro_ferreira
and it says The phone field format is invalid.
why 0 if the alpine pattern uses 9?
then why is it not working with only mask.....
it was working fine before in v2
v3 is different
hmmm ok thankyou π