Skip to content

Commit

Permalink
respect formnovalidate option of submit button
Browse files Browse the repository at this point in the history
  • Loading branch information
neferin12 committed Nov 5, 2024
1 parent fe7e364 commit 310a720
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/FormRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export default {
methods: {
onSubmitMeth(evt) {
evt.preventDefault();
if(evt.submitter.hasAttribute('formnovalidate')) {
this.onSubmit(this.data, evt);
return;
}
const form = document.getElementById(this.id);
if (form.checkValidity()) {
this.onSubmit(this.data, evt);
Expand Down

0 comments on commit 310a720

Please sign in to comment.