Skip to content

@saflib/vue


UsPhoneNumberInput ​

US phone number input that displays +1 formatting in the field and emits values in E.164 format for API calls.

Source: components/UsPhoneNumberInput.vue

Models ​

NameTypeDefaultRequiredDescription
modelValuestring | undefined""nov-model value in E.164 format (for example, +15551234567).

Props ​

NameTypeDefaultRequiredDescription
rules((value: string) => string | boolean)[] | undefined[]noAdditional Vuetify validation rules appended after the built-in phone rules.
requiredboolean | undefinedfalsenoWhen true, the built-in phone validation treats the field as required.
labelstring | undefined"Phone Number"noLabel shown on the underlying v-text-field.
placeholderstring | undefined"(555) 123-4567"noPlaceholder shown when the field is empty.
errorMessagesstring[] | undefined[]noExternal error messages passed through to v-text-field.

Exposed ​

NameTypeDescription
focus() => voidFocus the underlying Vuetify text field.