Adding javascript validation logic to stock page transaction element