https://en.wikipedia.org/wiki/International_Bank_Account_Number#Practicalities
The IBAN should not contain spaces when transmitted electronically: when printed it is expressed in groups of four characters separated by a single space, the last group being of variable length as shown in the example below:
A typical IBAN looks like this: GR16 0110 1250 0000 0001 2300 695
(taken from the above link).
I want to make it easier for users to enter IBAN numbers. Currently I use a TDBEdit
to display the IBAN number and it is stored as characters (without the spaces) in the database.
I know that it is possible to format numbers using TNumericField.DisplayFormat
, also there is TMaskEdit
, but both aren't terribly useful for this purpose as IBAN is not a number and has different lenghts in different countries.
How to edit an IBAN number in four character groups in a DB control?
PS: I'm not asking for the actual IBAN validation as I already have that figured out.