Is there a way to validate an IBAN number within LiveCycle Designer using Javascript and/or FormCalc?
i found this website: https://github.com/arhs/iban.js
where they have a javascript solution, but i don't know how to get it to work in Livecycle designer.
Can anyone help me?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
If you take the code from GitHub and add it to a script object and add the following code to the same script object
var exports = {};
function IBAN()
{
return exports;
}
You will be able to call the code using (assume the script object is called GitHib)
console.println(GitHub.IBAN().isValid('BE68539007547034'));
console.println(GitHub.IBAN().isValid('BE68539007547035'));
console.println(GitHub.IBAN().isValidBBAN('BE', '539-0075470-34'));
console.println(GitHub.IBAN().electronicFormat('BE68539007547034'));
console.println(GitHub.IBAN().electronicFormat('BE68 5390 0754 7034'));
console.println(GitHub.IBAN().printFormat('BE68539007547034'));
console.println(GitHub.IBAN().printFormat('BE68 5390 0754 7034'));
console.println(GitHub.IBAN().toBBAN('BE68 5390 0754 7034', '-'));
console.println(GitHub.IBAN().toBBAN('BE68 5390 0754 7034'));
console.println(GitHub.IBAN().fromBBAN('BE', '539007547034'));
Similar to the GitHib example in HTML but we have to reference the script object and IBAN as a function.
Here is my sample checking this works https://sites.google.com/site/livecycledesignercookbooks/home/IBAN.pdf?attredirects=0&d=1
Regards
Bruce
Views
Replies
Total Likes
Hi,
If you take the code from GitHub and add it to a script object and add the following code to the same script object
var exports = {};
function IBAN()
{
return exports;
}
You will be able to call the code using (assume the script object is called GitHib)
console.println(GitHub.IBAN().isValid('BE68539007547034'));
console.println(GitHub.IBAN().isValid('BE68539007547035'));
console.println(GitHub.IBAN().isValidBBAN('BE', '539-0075470-34'));
console.println(GitHub.IBAN().electronicFormat('BE68539007547034'));
console.println(GitHub.IBAN().electronicFormat('BE68 5390 0754 7034'));
console.println(GitHub.IBAN().printFormat('BE68539007547034'));
console.println(GitHub.IBAN().printFormat('BE68 5390 0754 7034'));
console.println(GitHub.IBAN().toBBAN('BE68 5390 0754 7034', '-'));
console.println(GitHub.IBAN().toBBAN('BE68 5390 0754 7034'));
console.println(GitHub.IBAN().fromBBAN('BE', '539007547034'));
Similar to the GitHib example in HTML but we have to reference the script object and IBAN as a function.
Here is my sample checking this works https://sites.google.com/site/livecycledesignercookbooks/home/IBAN.pdf?attredirects=0&d=1
Regards
Bruce
Views
Replies
Total Likes
Bruce,
Thank you for your answer.
I've got it working.
Only my Avast Virus scanner goes crazy on your sample.
Tels me it contains an infection: JS:Pdfka-gen [Expl]
You may want to scan your computer.
Regards,
Sebas
Views
Replies
Total Likes