adonisjs / rfcs

💬 Sharing big changes with community to add them to the AdonisJs eco-system
52 stars 6 forks source link

Update and structure validator API #40

Closed bitkidd closed 10 months ago

bitkidd commented 3 years ago

This proposal suggests to clean up the api by splitting the roles of methods, removing options from schemes and grouping them into corresponding groups: rules or a new group - modifiers, that takes the role of value mutation.

Full Rendered Proposal Discussion Thread

thetutlage commented 3 years ago

@targos @RomainLanz What you guys think?

targos commented 3 years ago

I'm generally ok with the approach. I'd still like us to find a way to help the user select the right rules (so they have an error when adding a string rule or modifier to a number field, or even better if we can prevent intellisense from suggesting wrong ones)