+ Reply to Thread
Results 1 to 3 of 3

Thread: How can i check European VAT-ID with rlValid.class.php

  1. #1
    Master
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    421

    How can i check European VAT-ID with rlValid.class.php

    Hi Guys,

    i have add a field in registration form for european VAT-ID.
    Now i have a problem. I must check the VAT-ID.

    Here for example a php script that check the european vat.

    PHP Code:
    Only registered members can view the code
    My questions are follow.
    1. For account fields there are some checking conditions (isURL, isDomain, isEmail). How can i add isVatId?
    2. How can i add the above code to rlValid.class.php? The key for this field = c_ustid.

    Best regards
    Steffen
    Last edited by Steffen Buschkemper; December 23, 2013 at 01:34 AM.

  2. #2
    Master
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    421
    OK Guys,

    i have found the solution... It was very easy...
    First i have add isVatId conditions list as follow in system.lib.php

    PHP Code:
    Only registered members can view the code
    Furthermore, i have added the language phrase for isVatId (vatcheck).
    So i can now create a function with name isVatId in rlValid.class.php and can assign them to the VAT-ID field.
    At Last i just have to modify the above code and paste it into the isVatId function.
    I have done as follow

    PHP Code:
    Only registered members can view the code
    Now we have add a new validcheck for account vat-id field.
    NOTE! I check with this above code only German and Austrian VAT-ID.
    If you want to validate vat-id by other european countries, the code must be extended and customized.

    Regards
    Steffen
    Last edited by Steffen Buschkemper; December 22, 2013 at 11:46 PM.

  3. #3
    Master
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    421
    Hey Guys,

    The problem is settled.
    For all interested, the above steps you need to insert your own validation in flynax script.

    Best regards
    Steffen

+ Reply to Thread