Custom validator for minimum and maximum values in the rails models