def validate_price(self, key, price): if not NumberValidator.is_double(price): raise Error(name='price', message='Geen juiste prijs(int, float)') return price