public function setup()
	{
		$this->addRule('ip', function($data)
		{
			if (isset($data['ip']) && !Validate::ip($data['ip']))
			{
				return Lang::txt('Invalid IP address');
			}

			return false;
		});
	}
public function setup()
	{
		$this->addRule('ip', function($data)
		{
			if (isset($data['ip']) && !Validate::ip($data['ip']))
			{
				return Lang::txt('Invalid IP address');
			}

			return false;
		});
	}
public function setup ( ) { $ this -> addRule ( 'ip' , function ( $ data ) { if ( isset ( $ data [ 'ip' ] ) && ! Validate :: ip ( $ data [ 'ip' ] ) ) { return Lang :: txt ( 'Invalid IP address' ) ; } return false ; } ) ; }
Runs extra setup code when creating a new model

@return  void
Runs extra setup code when creating a new model