Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

string().lowercase() and string().uppsercase() #220

Closed
bigluck opened this issue Mar 28, 2014 · 5 comments · Fixed by #321
Closed

string().lowercase() and string().uppsercase() #220

bigluck opened this issue Mar 28, 2014 · 5 comments · Fixed by #321
Assignees
Labels
feature New functionality or improvement
Milestone

Comments

@bigluck
Copy link

bigluck commented Mar 28, 2014

I would known if can be implemented an lowercase(), uppercase() and trim() modifier for strings, like in the mongoose Schema: http://mongoosejs.com/docs/api.html#schema-string-js

I think could become very usefull

@hueniverse
Copy link
Contributor

Problem is, how do you tell if lowercase() is a requirement or a modifier?

@bigluck
Copy link
Author

bigluck commented Apr 2, 2014

Great question.
If you wanna both modifier and requirement, one can be called .toLowercase() and the other .lowercase()

@hueniverse
Copy link
Contributor

How about Joi.string().uppercase({ force: true })? Without the option it just tests for it.

@bigluck
Copy link
Author

bigluck commented Apr 19, 2014

Cool!!! 👍

@hueniverse hueniverse added this to the 4.3.0 milestone May 20, 2014
@hueniverse hueniverse self-assigned this May 20, 2014
@hueniverse hueniverse added feature New functionality or improvement and removed request labels Sep 19, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants