String validation rule accepting sanitize methods like uppcase, lowercase, etc...
popovicieduard opened this issue · 2 comments
popovicieduard commented
Why this feature is required (specific use-cases will be appreciated)?
In v4 you could register sanitazor methods to the validator, it would be nice to have some sanitazation rules on strings rules, like to uppsercase, to lowercase, trim.
Have you tried any other work arounds?
This can be done before using the validator validate method, but you would have to keep track of 2 places for a single use case.
Are you willing to work on it with little guidance?
Yes.
thetutlage commented
We already have escape
and trim
options on the string schema type. I am not 100% sure about the casing options, coz the possibilities are unlimited. For example:
- Upper case
- Lower case
- Snake case
- Camel case
- Pascal case
- Kebab case
- Dash case
- Slugify
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.