Added basic registration validation javascript

Signed-off-by: M. Sameer Khan <sameerm.khan@hotmail.com>