How can I add required validation on filepond vue?

2.3k views Asked by At

I read on this docs : https://github.com/pqina/vue-filepond

I try to add like this :

<FilePond 
    allowMultiple="true"
    accepted-file-types="image/jpg, image/jpeg, application/pdf"
    maxFileSize="2MB"
    required="true"/>

multiple, validation file type, max file works

But, required does not works

How can I solve this problem guys?

1

There are 1 answers

0
Rik On

Using the v-bind:required prop works:

<form method="post" action="">
    <file-pond v-bind:required="true"/>
    <button type="submit">submit</button>
</form>

Related GitHub issue: https://github.com/pqina/vue-filepond/issues/138