SimpleForm::BankAccountNumber
A SimpleForm input field for bank account numbers.
Usage
Just create a new input field with :bank_account_number
as its type.
Note that you need to explicitly set the country
and value
options, like this:
f.input_field :account_number, as: :bank_account_number, country: user.country, value: user.account_number
- the country is the ISO 3166-1 alpha-2 representation
- the value can't be inferred automatically unfortunately so you have to set it explicitly
Also note that you'll get multiple values for each number part upon form submission. You probably want to concatenate them into one single number for your backend with something along these lines:
params[:bank_deposit][:account_number] = params[:bank_deposit][:account_number].join
License
MIT