Welcome Guest, Not a member yet? Register   Sign In
why is form validation having issue with spaces?
#4

[eluser]scout[/eluser]
I ended up hacking the system form_validation library by adding \s to the alpha_dash function. All the tests I ran against the server wouldn't reveal any server or configuration problems. This hack resolved the matter instantly. Still, on another server I did not have this problem. Weird.

Code:
function alpha_dash($str)
{
  return ( ! preg_match("/^([-a-z0-9_-\s])+$/i", $str)) ? FALSE : TRUE;
}


Messages In This Thread
why is form validation having issue with spaces? - by El Forum - 06-02-2011, 10:56 AM
why is form validation having issue with spaces? - by El Forum - 06-05-2011, 06:18 PM
why is form validation having issue with spaces? - by El Forum - 01-22-2012, 01:41 PM
why is form validation having issue with spaces? - by El Forum - 01-22-2012, 03:06 PM
why is form validation having issue with spaces? - by El Forum - 02-11-2012, 11:31 AM
why is form validation having issue with spaces? - by El Forum - 02-11-2012, 12:52 PM
why is form validation having issue with spaces? - by El Forum - 02-11-2012, 12:57 PM
why is form validation having issue with spaces? - by El Forum - 02-11-2012, 01:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB