Add some JS validation
Merge pull request #1 from Warry/master

Add some JS validation