cluster Posted October 19, 2015 Share Posted October 19, 2015 added a custom field for company VAT No. but my regex does not work ... allowed characters > a-z A-Z 0-9 hyphen, underscore, spaces and slash min = 4 - max = 28 /^[0-9a-zA-z_-. ]{4,28}$/ test: BE-12345678 but it shows VAT number not valid 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 19, 2015 Share Posted October 19, 2015 have you tried the example in the documentation ? http://docs.whmcs.com/Custom_Fields#Regular_Expression_Validation 0 Quote Link to comment Share on other sites More sharing options...
cluster Posted October 19, 2015 Author Share Posted October 19, 2015 yes, it seems I can enter any regex ... and I always get the same message - not valid could it be a bug? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 19, 2015 Share Posted October 19, 2015 (edited) if you're using the EU VAT Addon, that can validate the VAT number on the order page. or try the following... /^[a-zA-Z0-9-_ ]{4,28}$/ Edited October 19, 2015 by brian! 0 Quote Link to comment Share on other sites More sharing options...
cluster Posted October 19, 2015 Author Share Posted October 19, 2015 if you're using the EU VAT Addon, that can validate the VAT number on the order page. or try the following... /^[a-zA-Z0-9-_ ]{4,28}$/ yeah, that worked! is there also a regex setting for customer phone which allows "+"? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 19, 2015 Share Posted October 19, 2015 yeah, that worked!is there also a regex setting for customer phone which allows "+"? might be worth reading the post below... http://forum.whmcs.com/showthread.php?91718-Whmcs-and-phonenumber-in-ORG-contact-(countrycode-not-prefilled-)&p=386202#post386202 The phone number should be entered in the format area code and country code (eg. 123456789)You should not enter the country code or any punctuation into the WHMCS phone number field (eg. +44). The registrar module code itself will need to handle adding the country code to the phone number field automatically based upon the client's country. 0 Quote Link to comment Share on other sites More sharing options...
cluster Posted October 20, 2015 Author Share Posted October 20, 2015 (edited) if you're using the EU VAT Addon, that can validate the VAT number on the order page. or try the following... /^[a-zA-Z0-9-_ ]{4,28}$/ In modern theme there is no such a field for VAT number, and if I use a custom field, how can it assigned that it's used as company vat no? Or is there a shortcode or special input field code to insert in the checkout (viewcart.tpl)? Edited October 20, 2015 by cluster 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 20, 2015 Share Posted October 20, 2015 In modern theme there is no such a field for VAT number, and if I use a custom field, how can it assigned that it's used as company vat no? Or is there a shortcode or special input field code to insert in the checkout (viewcart.tpl)? http://docs.whmcs.com/EU_VAT_Addon in its settings, you need to setup a client custom field for the VAT number and tell the addon to use that as a VAT Number field... it should then show the client field at checkout and validate the VAT number when the order is placed. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.