checking for valid values in sell & purchase views