If you need to create new models or customize existent ones, you can do it so at the app/models/custom folder. Keep in mind that for old models you'll need to firstly require the dependency.
For example for Madrid's City Hall fork its required to check the zip code's format (it always starts with 280 followed by 2 digits). That check is at app/models/custom/verification/residence.rb:
Do not forget to cover your changes with a test at the spec/models/custom folder. Following the example we could create spec/models/custom/residence_spec.rb:
require'rails_helper'describe Verification::Residencedo let(:residence) { build(:verification_residence, document_number: "12345678Z") } describe "verification"do describe "postal code"do it "should be valid with postal codes starting with 280"do residence.postal_code ="28012" residence.valid? expect(residence.errors[:postal_code].size).to eq(0) residence.postal_code ="28023" residence.valid? expect(residence.errors[:postal_code].size).to eq(0)end it "should not be valid with postal codes not starting with 280"do residence.postal_code ="12345" residence.valid? expect(residence.errors[:postal_code].size).to eq(1) residence.postal_code ="13280" residence.valid? expect(residence.errors[:postal_code].size).to eq(1) expect(residence.errors[:postal_code]).to include("In order to be verified, you must be registered in the municipality of Madrid.")
endendendend