for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @package Fuel\Validation
* @version 2.0
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2013 Fuel Development Team
* @link http://fuelphp.com
*/
namespace Fuel\Validation\Rule;
use Fuel\Validation\AbstractRule;
* Checks if a value is a valid number
*
* @package Fuel\Validation\Rule
* @since 2.0
class Number extends AbstractRule
{
* Contains the rule failure message
* @var string
protected $message = 'The field is not valid number.';
* Performs validation on the given value
* @param mixed $value Value to validate
* @param string $field Unused by this rule
* @param array $allFields Unused by this rule
* @return bool
public function validate($value, $field = null, $allFields = null)
return is_numeric($value);
}