Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Print the input yourself: https://docs.codewars.com/training/troubleshooting/#print-input
What? It's completely fair. The example tests have the correct data. How you manage it it your business. And by the way, please mind your language.
I think now I understand your problem (though I still don't get why your code would fail if it were correct), random tests display things like
testing for validate_pin(157704)
(but alsotesting for validate_pin(xZxS2J?)
, which could have made you understand it was all strings), it would be clearer if the log wastesting for validate_pin('xZxS2J?')
. I'll publish a new fork with this change.This comment is hidden because it contains spoiler information about the solution
???
The description says
If the function is passed a valid PIN string, return true, else return false.
, so I can't see the problem.Also, the title of the kata is
Regex validate PIN Code
. Though the use of regexes is not enforced, regexes only apply to strings.And having a look at sample tests like I told you you would have seen you were passed strings. How would they pass you something like "a234" if it were not a string??
I'm not sure to understand your problem but as stated in the description, and as you can see having a look at sample test cases (just under the code editor window), the inputs in this kata are all strings.
307599 - False should equal True
means, necessarily, your function returnsFalse
in this case. And the culprit is your code. This may help you debugging: https://docs.codewars.com/training/troubleshooting/https://docs.codewars.com/training/troubleshooting/#post-discourse