fabian-hiller / valibot

The modular and type safe schema library for validating structural data 🤖
https://valibot.dev
MIT License
6.35k stars 204 forks source link

What should I put inside the pipe #788

Closed v4sj4n closed 3 months ago

v4sj4n commented 3 months ago
                                <input
                                    type="file"
                                    id=""
                                    {...register('file')}
                                />
    file: v.pipe(
       v.instance(FileList),
       v.mimeType(["application/pdf", ])
    ),

My question is how should I validate this one am I right and how is it done, what if I want to check the size, or if its multiple files ( I am asking different use cases cause I might need them in the future)

fabian-hiller commented 3 months ago

Feel free to contact us if you still have questions.