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

add more options in isLength - feature request #1937

Open
guicompeng opened this issue Mar 9, 2022 · 4 comments
Open

add more options in isLength - feature request #1937

guicompeng opened this issue Mar 9, 2022 · 4 comments

Comments

@guicompeng
Copy link

Currently the options for isLength are min and max only.
I believe there could be more options. I'm needing the field size to be exactly 11 or 14 or 16.
For now I'm using min 11 and max 16 but in my program the length values (12, 13, 15) should not be accepted.
a new option can be:

exact: {11, 14, 16} or
size: {11, 14, 16}

Do you think this change adding more options would be a good thing?

@Carlos-Gaxiola
Copy link

Hello, as a user, I think this is a really useful feature, I am currently working in this issue, to create a function that does this, I will create a Pull Request later when I complete the feature :)

@bevatsal1122
Copy link
Contributor

Hello, I have added the required feature. If the string length falls in the range and if exact number/array/object is mentioned, then exact conditions are checked. If not provided, then true is returned is len>=min & len<=max and false is returned is not in range [min, max]. Thanks for giving me a chance to contribute :)
PR#2019 - #2019

@bevatsal1122
Copy link
Contributor

Heyy @rubiin !! This additional feature is been added in PR #2019. It would be great if you could have a look.

@NwaforAugustine321
Copy link

@guicompeng I want to know if this issue is still open for me to work on it. Thanks and look forward to hearing from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants