Show
Ignore:
Timestamp:
12/17/2007 03:55:08 PM (13 months ago)
Author:
armen
Message:

Added valid::standard_text.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/helpers/valid.php

    r1449 r1579  
    330330        } 
    331331 
     332        /** 
     333         * Method: numeric 
     334         *  Checks whether a string is a valid text 
     335         * 
     336         * Parameters: 
     337         *  str  - input string 
     338         * 
     339         * Returns: 
     340         *  TRUE if string is a valid text, FALSE if not. 
     341         */      
     342        public static function standard_text($str) 
     343        { 
     344                return preg_match('/^[-\pL\pN\pZs_]+$/uD', (string) $str); 
     345        } 
     346 
    332347} // End valid