added currency conversion versions of min and max and validate function