fix discount code field not to show when the only possible code is already applied
enotice fix in validate function