Closed lucasterra closed 5 years ago
That is not something I can reproduce. I think either...
You could try with $validator->coerce(1)
and see if it still reports any errors. If enabling coercion works, then it must be your input data.
You can look at https://github.com/mojolicious/json-validator/blob/4b30d066d2b0065789a7dd59e75fe4514878eed7/t/jv-string.t for more details.
Hey @jhthorsen adding $validator->coerce(1)
worked for me. Thanks a lot for the help.
I'll close the issue, if that's ok.
That must mean that you had: {credit_card_number=>5252525252525252}
and not {credit_card_number=>”5252525252525252”}
Steps to reproduce the behavior
Expected behavior
I expected the validation to pass.
Actual behavior
It fails saying that "credit_card_number" is a number, not a string.