Please don't send me to vbulletin.org on this thread. This is not for a mod, it's for fill out fields in the control panel.
When you create a custom profile field there is a spot for RegExp to validate the user's input. I thought it would be nice to put common RegExp's in one thread (didn't find any in a search).
What I'm looking for is how to validate a url. How would you turn this into the appropriate value to input?
preg_match("#^([\w$-.+!*'()@:?=&/;]+)$#",$myvar)
Do you put the whole thing there? Just in between the quotes? Include the quotes? The inline help doesn't explain this well.
And some other good ones people probably want to know are:
Email:
US Phone Number:
Credit Card number:
US Zip Code:
If someone has the answers, dump them here. Thank you.
When you create a custom profile field there is a spot for RegExp to validate the user's input. I thought it would be nice to put common RegExp's in one thread (didn't find any in a search).
What I'm looking for is how to validate a url. How would you turn this into the appropriate value to input?
preg_match("#^([\w$-.+!*'()@:?=&/;]+)$#",$myvar)
Do you put the whole thing there? Just in between the quotes? Include the quotes? The inline help doesn't explain this well.
And some other good ones people probably want to know are:
Email:
US Phone Number:
Credit Card number:
US Zip Code:
If someone has the answers, dump them here. Thank you.
Comment