Not sure I get this, but shouldn't this be `!/\D+/.test(attrs.drop_count)`?