added jscs and updated validation err