To prevent errors, restrict input values.