Applying patch by rnowotniak, fixes #5523

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7706 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
the_undefined 2008-10-06 10:43:57 +00:00
parent b5473a5f9b
commit 38bc438fc7
2 changed files with 15 additions and 1 deletions

View file

@ -139,7 +139,7 @@ class Validation extends Object {
if (empty($_this->check) && $_this->check != '0') {
return false;
}
$_this->regex = '/[^\s]+/mu';
$_this->regex = '/[^\s]+/m';
return $_this->_check();
}
/**

View file

@ -69,6 +69,20 @@ class ValidationTestCase extends CakeTestCase {
function setup() {
$this->Validation =& Validation::getInstance();
}
/**
* testNotEmpty method
*
* @access public
* @return void
*/
function testNotEmpty() {
$this->assertTrue(Validation::notEmpty('abcdefg'));
$this->assertTrue(Validation::notEmpty('fasdf '));
$this->assertTrue(Validation::notEmpty('fooo'.chr(243).'blabla'));
$this->assertFalse(Validation::notEmpty("\t "));
$this->assertFalse(Validation::notEmpty(""));
}
/**
* testAlphaNumeric method
*