function check()
 {
     if (!$this->hasCheckbox) {
         return parent::check();
     }
     $value = $this->container->data[$this->ref];
     if ($value != $this->valueOnCheck && $value != $this->valueOnUncheck) {
         return $this->container->errors[$this->ref] = jForms::ERRDATA_INVALID;
     }
     if ($value == $this->valueOnCheck) {
         // the checkbox is checked, let's check children
         return parent::check();
     }
     // the checkbox is NOT checked
     return null;
 }