Closed collin-pham closed 4 years ago
I was thinking the same thing. One of our user generators failed for missing requirments, it may be because of this.
I don't believe this is guaranteed, no. There's a test for something similar, but that passes out of lacking other characters, not for fulfilling a strict lowercase requirement.
There is a lowercase
rule, which when combined with strict
mode should guarantee the presence of a lowercase character.
That option, though, is neither documented nor unit tested, so that should be fixed.
@donedgardo @collin-pham you should be able to combine lowercase: true
with strict: true
to get this guarantee for the time being. If you want to send a PR with an improvement, I'll review it, otherwise I'll patch this over the weekend.
Is it guaranteed that there will be at least one lowercase character when multiple options, including strict, are set to true. For example, if my options object looks like
Is it possible that
generator.generate(options)
will return a string without any lowercase characters. That is, it will only contain numbers, symbols and uppercase characters.It would be helpful to add the answer to this question to the README. Thanks!