sfxcode / formkit-primevue

PrimeVue (v4, v3) support for the FormKit validation Framwork
https://sfxcode.github.io/formkit-primevue
MIT License
103 stars 9 forks source link

InputMask example? #33

Closed lmc3s3f0r closed 8 months ago

lmc3s3f0r commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

Thanks @sfxcode! This worked like a charm :)