fixed isInvalid
Merge pull request #14 from manoro/feature/valid

fixed isInvalid