vinejs / vine

VineJS is a form data validation library for Node.js
https://vinejs.dev
MIT License
1.1k stars 21 forks source link

Question - How can I write a custom string validator? #68

Closed tcurdt closed 3 months ago

tcurdt commented 3 months ago

Package version

@vinejs/vine@2.1.0

Describe the bug

Sorry, but opening the other issue types did somehow not work 🤔

I have a blacklist dictionary and I don't want to provide that as an array. I would like to write my own string validator. But I am somehow not seeing any docs on that. And looking at the code it also does not seem to vine allows for this

https://github.com/vinejs/vine/blob/develop/src/schema/string/main.ts#L300

Reproduction repo

No response

thetutlage commented 3 months ago

Docs already cover it here. https://vinejs.dev/docs/extend/custom_rules

Try to implement a rule and create issues around specific hurdles you face.