function validateLength updated 

function validateLength updated to work correctly with deposit termination process while different options choosen