Welcome Guest, Not a member yet? Register   Sign In
Calling index() on form validation failure
#13

salain, that helped once again. Problem was the regex. This is what I have ended up with....
seems to work with textareas as well:


PHP Code:
if ( ! function_exists('customAlpha')) {
 
   function customAlpha($str)
 
   {
 
       if (!preg_match('/^[a-zA-Z0-9 .,\-\']*$/m'$str)) {
 
           return FALSE;
 
       } else {
 
           return TRUE;
 
       }
 
   }

Reply


Messages In This Thread
RE: Calling index() on form validation failure - by dbrooke - 10-31-2016, 01:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB