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

mask format for postal code canada #10

Open
speedtechj opened this issue Mar 7, 2021 · 2 comments
Open

mask format for postal code canada #10

speedtechj opened this issue Mar 7, 2021 · 2 comments

Comments

@speedtechj
Copy link

How to use mask format for postal code canada exmple t2v2x7

@juareznasato
Copy link
Owner

juareznasato commented Mar 19, 2021

I don't know canadian postal code, but you can try it, changing inputMask and outputMask:

<template>
  <div>
    <v-text-field-simplemask
      v-model="value"
      v-bind:label="label"
      v-bind:properties="{
        prefix: '',
        suffix: '',
        readonly: false,
        disabled: false,
        outlined: false,
        clearable: true,
        placeholder: '',
      }"
      v-bind:options="{
        inputMask: '##-####-####-###',
        outputMask: '##-####-####-###',
        empty: null,
        applyAfter: false,
        alphanumeric: true,
        lowerCase: false,
      }"
      v-bind:focus="focus"
      v-on:focus="focus = false"
    />
  </div>
</template>
<script>
export default {
  data: () => ({
    value: "23-A568-B953-356", // "23-A568-B953-356" or "" or null
    label: "Simple Mask",
    focus: false,
  }),
};
</script>

@johnrmore
Copy link

If it helps this is a working regular expression got 'go' language
Postal Code (^[^DFIOQIWZ][0-9][A-Y]{1}[- ]{0,1}[0-9]{1}[A-Z]{1}[0-9]{1}$)

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

3 participants