Welcome Guest, Not a member yet? Register   Sign In
Validation class: alpha-dash-comma - ?
#4

[eluser]tinawina[/eluser]
Hey thanks!

ucantblamem -- your solution did the trick. I had tried a slash before the comma before to no avail. But thanks for the suggestion tonanbarbarian.

I also had to add a space in there since we are allowing people to enter phrases or a couple of words separated by a space. All is working well now. Here's where we landed:

Code:
function alpha_dash_comma($str)
{
    return ( ! preg_match("/^([-a-z0-9_, ])+$/i", $str)) ? FALSE : TRUE;
}
Thanks for the assistance!


Messages In This Thread
Validation class: alpha-dash-comma - ? - by El Forum - 12-20-2007, 03:45 PM
Validation class: alpha-dash-comma - ? - by El Forum - 12-20-2007, 04:24 PM
Validation class: alpha-dash-comma - ? - by El Forum - 12-20-2007, 04:30 PM
Validation class: alpha-dash-comma - ? - by El Forum - 12-20-2007, 05:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB