Closed markovanderpuil closed 3 years ago
First: Thanks for the report!
This is very strange and I am not able to reproduce the problem.
Could you post the complete stack trace? What versions of activerecord and ruby are you using?
this error occurs when using ", require: 'valvat/local'" in gemfile as
gem 'valvat', require: 'valvat/local'
removing require clause will remove the error ... Made me scratch my head for some time.
valvat (0.9.1) lib/active_model/validations/valvat_validator.rb:46:in `vat_exists?'
What I'm trying to accomplish is this:
So EU countries are matched and lookupped and other countries are allowed as well without lookup
validates :taxid, valvat: {match_country: :country, lookup: true, allow_blank: true, if: :eu?}