skip to Main Content

HTML Input pattern attribute is not working in Vue 3 as expected

I have a simple form in my Vue 3 app as below, <form @submit.prevent="createProject"> <div class="my-3"> <label for="name" class="form-label">Project Name</label> <input type="text" class="form-control" id="name" placeholder="Enter project name" v-model="projectName" pattern="[A-Za-z0-9s-_]+" required /> </div> <div class="text-end mt-4"> <button class="btn btn-dark" type="submit">Save</button> </div>…

VIEW QUESTION
Back To Top
Search