mas_ Posted June 30, 2010 Share Posted June 30, 2010 I have a vBulletin Version 4.0.1, and I am trying to change the phone input box so s/he can't sign up until he insert a phone number that is between 7 to 10 numbers "just numbers with no dashes, ex: 47216582" Also, on the control panel there is a box says Regular Expression: you may require the input field to match a regular expression (PCRE) What I did is that: preg_match([0-9]{7,10}$field2) But it doesn't work !! any help ? Quote Link to comment https://forums.phpfreaks.com/topic/206286-regular-expression-in-vbulletin-version-401/ Share on other sites More sharing options...
dabaR Posted June 30, 2010 Share Posted June 30, 2010 preg_match([0-9]{7,10}$field2) can't work, because it is syntactically incorrect. You can try preg_match('/^[0-9]{7,10}$/', $field2) Quote Link to comment https://forums.phpfreaks.com/topic/206286-regular-expression-in-vbulletin-version-401/#findComment-1079193 Share on other sites More sharing options...
mas_ Posted July 1, 2010 Author Share Posted July 1, 2010 thanks it is working Quote Link to comment https://forums.phpfreaks.com/topic/206286-regular-expression-in-vbulletin-version-401/#findComment-1079430 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.