sorted validDecimalInput method.