Added method is_valid to number editor