OCA, Java SE 8
kumar kolapalli wrote: looking for java validation (not javascript) that checks in the password not to have alphabet or numeric sequence.
for eg., 12345, abcde, abcdefg, 123456 should not be allowed
1234, abcd, 2345, cdef are allowed.
I mean sequence of alphanumeric characters of length upto 4 are allowed and sequence of
alphanumeric characters of length greater than 4 should not be allowed in password .
I have tried in Regex, but couldn't achieved .
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Assuming you're only talking about sequences, and a password of "1234abcd" is perfectly valid, then my suggestion would be to set up regexes for 5 or more alphabetic or numeric characters - for alphabetic it would be something like "[a-zA-Z]{5,}" - and reject the password if you find one.
Richard Tookey wrote:Sorry Winston but I don't think this in any way applies to detecting a sequence;
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
kumar kolapalli wrote:4. May not contain common keyboard sequences (eg. 12345, aaaaa): matched case insensitive, matched forwards and backwards
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
See where your hand is? Not there. It's next to this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|