Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: iban validation

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Thanked 0 Times in 0 Posts

    Default iban validation

    I was looking for a java method to validate belgian iban number using the following algorithm:
    -Check that the total IBAN length is 16. If not, the IBAN is invalid
    -Move the four initial characters to the end of the string
    Replace each letter in the string with two digits, thereby expanding the string, where A = 10, B = 11, ..., Z = 35
    -Interpret the string as a decimal integer and compute the remainder of that number on division by 97
    -If the remainder is 1, the check digit test is passed and the IBAN might be valid.

    also there should be some general checks as the string is valid, only contains letters and digits and no special characters.. etc

    i am not able to figure out how to move initial four characters to the end replace letters in string as mentioned above..
    Kindly help..


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Eastern Florida
    Thanked 2,273 Times in 2,244 Posts

    Default Re: iban validation

    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Grand Poobah
    Join Date
    Mar 2011
    My Mood
    Thanked 167 Times in 158 Posts

    Default Re: iban validation

    Quote Originally Posted by samaira View Post
    i am not able to figure out how to move initial four characters to the end replace letters in string as mentioned above..
    Split the String into 2 substrings. Concatenate them back together.
    Improving the world one idiot at a time!

Similar Threads

  1. Validation
    By Dipali86 in forum Other Programming Languages
    Replies: 1
    Last Post: October 29th, 2012, 11:25 AM
  2. Validation for SpecialCharacter
    By surendran610 in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: August 29th, 2011, 03:00 PM
  3. Help With Validation
    By bengregg in forum Loops & Control Statements
    Replies: 4
    Last Post: February 1st, 2011, 03:24 AM
  4. Jtextfield Validation
    By nimishalex in forum AWT / Java Swing
    Replies: 8
    Last Post: December 11th, 2010, 01:42 AM
  5. Problems with If validation
    By websey in forum Loops & Control Statements
    Replies: 1
    Last Post: November 18th, 2009, 08:43 AM