add JS validation