API15

JTable/check: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Generic check method <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {...
 
Line 44: Line 44:
  format= ,,,
  format= ,,,
</dpl>
</dpl>
<code>
function check() {
if($this->title == ''){
$this->setError(JText::_('This record requires a title'));
return false;
}
return true;
}
</code>

Revision as of 16:09, 1 August 2010

Description

Generic check method

[Edit Descripton]

Template:Description:JTable/check

Syntax

check()


Returns

boolean True if the object is ok

Defined in

libraries/joomla/database/table.php

Importing

jimport( 'joomla.database.table' );

Source Body

function check()
{
        return true;
}

[Edit See Also] Template:SeeAlso:JTable/check

Examples

<CodeExamplesForm />


function check() {

if($this->title == ){ $this->setError(JText::_('This record requires a title')); return false; } return true; }