validator-collection icon indicating copy to clipboard operation
validator-collection copied to clipboard

Error in README example

Open michaelcosley opened this issue 1 year ago • 0 comments

I believe there is a small/minor error in one of the examples shown in the README in one of the checker examples.

from validator_collection import checkers

result = validators.is_integer('this is an invalid variable name')
# result will be False

The issue with this code is that checkers.is_integer should be called, rather than validators.is_integer

Fixed example:

from validator_collection import checkers

result = checkers.is_integer('this is an invalid variable name')
# result will be False

I verified this issue by running the original code section which returns a "NameError" when run, and I verified the fixed code section now runs without a NameError.

michaelcosley avatar Jul 06 '24 19:07 michaelcosley