mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 20:46:24 +00:00
Merge branch '1.3-misc' of dev@code.cakephp.org:cakephp into 1.3-misc
This commit is contained in:
commit
190a8b8307
2 changed files with 1 additions and 28 deletions
|
@ -35,7 +35,7 @@
|
||||||
* @subpackage cake.cake.libs
|
* @subpackage cake.cake.libs
|
||||||
* @since CakePHP v 1.2.0.3830
|
* @since CakePHP v 1.2.0.3830
|
||||||
*/
|
*/
|
||||||
class Validation {
|
class Validation extends Object {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the the value of methods $check param.
|
* Set the the value of methods $check param.
|
||||||
|
|
|
@ -1770,33 +1770,6 @@ class ValidationTest extends CakeTestCase {
|
||||||
$this->assertFalse(Validation::inList('three', array('one', 'two')));
|
$this->assertFalse(Validation::inList('three', array('one', 'two')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* testValidNumber method
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function testValidNumber() {
|
|
||||||
$this->assertTrue(Validation::custom('12345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('-12345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('+12345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('--12345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('++12345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('a12345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('12345z', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('-a12345z', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('-', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('123-12345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('1.2345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('-1.2345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('+1.2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('1..2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('-1..2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('+1..2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('.2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('12345.', VALID_NUMBER));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testRange method
|
* testRange method
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue