Contains tips for configurators working with Aware IM
#54386 by PointsWell
Tue Jul 21, 2020 4:36 am
Someone asked about validating IBANs a while ago and I saw that there was a whole bunch of validators inside commons-validator.jar so I made my first function library plug in (mainly because I wanted ISBN checking).

Attached is the plug in if anyone wants it.

NOTE: this does not check that the IBAN/ISSN/ISBN exists only that it conforms to the standard (which will save you a REST call and 0.001¢ on your call limit).

Contains following functions:

All of them get called with a string as a parameter

eg VALIDATE_ISBN('9781231231234') or VALIDATE_ISBN(Bo.Attribute)
You will need to strip spaces from the IBAN before validating or it will return a response of not valid (No).

I have done the bare minimum here to reuse existing open source code, the load lifting is all done by code from here: ... index.html all I have done is put a plug in wrapper round it, so no warranties are given, no liabilities are accepted, if you get a headache, your server melts down or your dog runs away from you it's not my fault.

The zip attached includes the source code for the plug in you can download the source code for CommonsValidator from ... idator.cgi (the zip became too big to leave it in the Jar and upload here. The version of Commons Validator that ships with AIM does not contain the necessary routines. I have done enough testing to check it is producing results the BSV attached will let you see it in action.

You'll need to add the following line to your BASServer.props and then restart your server

There's a bunch of other stuff in the Commons library including credit card validators (again structure checker not checking it is a real number).

I am not a java programmer either, so I can't answer code related questions but I have put this all together using Vlad's Java plug-in videos and reading the Apache help docs, so clearly it doesn't require the brains of an archbishop to do

If you make this better, or add stuff to it, please add it here

**Edit - wrong BSV uploaded initially**
(172.07 KiB) Downloaded 263 times

Who is online

Users browsing this forum: No registered users and 2 guests