Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputMask example? #33

Closed
lmc3s3f0r opened this issue Jan 17, 2024 · 2 comments
Closed

InputMask example? #33

lmc3s3f0r opened this issue Jan 17, 2024 · 2 comments

Comments

@lmc3s3f0r
Copy link

Hi. I'm trying to see how to use primeInputMask in the demo playground (https://formkit-primevue.netlify.app/), but if I change anything there with the schema text editor, instead of updating the form, the schema is displayed as text.

Anyway, in my app, if I set a FormKitSchema like this

{
$formkit: 'primeInputMask',
type: 'text,
name: "Phone",
mask: '+1 (###) ###-####',
validation: 'required',
validationVisibility: 'live'
}

I can see the mask in the input, but typing doesn't do anything.

Would anybody have an example of how to use primeInputMask?

@sfxcode
Copy link
Owner

sfxcode commented Jan 17, 2024

Hi,

your mask format is not valid.

It should be:

{
      $formkit: 'primeInputMask',
      name: 'phone',
      label: 'Phone',
      mask: '+1 (999) 999-9999',
      placeholder: '+1 (###) ###-####',
      validation: 'required',
      validationVisibility: 'live',
    },

I will add it as demo.

Greetings,

Tom

@lmc3s3f0r
Copy link
Author

Thanks @sfxcode! This worked like a charm :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants