Improve ratings dialog to allow only valid values (#2199).