Revert "Merge pull request #1 from dajdari3/master"

This reverts commit 964e04dee32d4e79defed08ccb3fe859d7d85dda, reversing
changes made to e48381ed930a407fb6ae8cfebee03e6bd6cdd9c0.
Reverted bad merge. Updated validation check