Fix typo in method call
Reorganize validation js