Add some validations
Merge pull request #13 from fenprace/master

Some validations