I am trying to get my vuetify form to validate my text box on the following criteria "AB-12345678" or if user forgos the hyphen and just puts in a number with a max of 8 digits. Can regex rules account for both of these scenarios in a single expression? My code so far:
<v-form ref="sidebarSearchForm" lazy-validation v-on:submit.prevent>
@Html.AntiForgeryToken()
<v-text-field label="Search"
single-line
filled
rounded
dense
append-icon="mdi-magnify"
v-model="id"
:rules"[v => !!v || 'ID Required!']"
@@click:append="searchID"
v-bind="{error: !validationProp,...(!validationProp && { 'error-messages': ['ID not found!'] })}"></v-text-field>
</v-form>