added JS registration validation