Fixed api of validating
Merge pull request #6 from henryyan/master

Fixed api of validating