Added local JS validation

Added JS validation before submit itself. Some other UI changes also.
Revert "Added local JS validation"

This reverts commit be95378c23a207a0ac32e1c7be8de71ea9416632.